Created
January 31, 2021 20:19
-
-
Save thoraxe/76655601ef128cdba10dfdcaab9b2a70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- alias: Turn on main stairs and landing lights on lower sensor movement | |
trigger: | |
platform: state | |
entity_id: binary_sensor.main_stairs_bottom_sensor_occupancy | |
to: 'on' | |
action: | |
- service: light.turn_on | |
entity_id: light.main_stairs_light | |
data_template: | |
brightness: >- | |
{% if state_attr('sun.sun','elevation') > 3 %} | |
255 | |
{% else %} | |
1 | |
{% endif %} | |
- service: light.turn_on | |
entity_id: light.downstairs_landing_light | |
data_template: | |
brightness: >- | |
{% if state_attr('sun.sun','elevation') > 3 %} | |
255 | |
{% else %} | |
50 | |
{% endif %} | |
- service: light.turn_on | |
entity_id: light.upstairs_hallway_light | |
data_template: | |
brightness: >- | |
{% if state_attr('sun.sun','elevation') > 3 %} | |
255 | |
{% else %} | |
1 | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment