pjarbit

Light motion sensor with Lux control

Oct 29th, 2024
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. alias: Stair Lights Control
  2. description: >-
  3. Turn stair lights on when motion is detected at top or bottom, off after no
  4. motion. using lux and 2 motion sensors
  5. triggers:
  6. - entity_id: binary_sensor.downstairs_motion_sensor
  7. to: "on"
  8. trigger: state
  9. - entity_id: binary_sensor.upstairs_aqara_motion_p2_occupancy
  10. to: "on"
  11. trigger: state
  12. - entity_id: binary_sensor.downstairs_motion_sensor
  13. to: "off"
  14. trigger: state
  15. - entity_id: binary_sensor.upstairs_aqara_motion_p2_occupancy
  16. to: "off"
  17. trigger: state
  18. conditions:
  19. - condition: numeric_state
  20. entity_id: sensor.upstairs_aqara_motion_p2_illuminance
  21. below: 30
  22. actions:
  23. - choose:
  24. - conditions:
  25. - condition: or
  26. conditions:
  27. - condition: state
  28. entity_id: binary_sensor.motion_sensor
  29. state: "on"
  30. - condition: state
  31. entity_id: binary_sensor.upstairs_aqara_motion_p2_occupancy
  32. state: "on"
  33. sequence:
  34. - action: light.turn_on
  35. entity_id: light.front_foyer_front_stairs_led_2
  36. data:
  37. brightness_pct: 42
  38. - conditions:
  39. - condition: state
  40. entity_id: binary_sensor.motion_sensor
  41. state: "off"
  42. - condition: state
  43. entity_id: binary_sensor.upstairs_aqara_motion_p2_occupancy
  44. state: "off"
  45. sequence:
  46. - delay: "00:01:00"
  47. - action: light.turn_off
  48. entity_id: light.front_foyer_front_stairs_led_2
  49. mode: queued
  50. max: 5
Advertisement
Add Comment
Please, Sign In to add comment