Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fade_torchere:
- alias: Fade Torchere lights
- sequence:
- # - condtion: state
- # entity_id: light.living_room_torchere_e27
- # state: 'on'
- - condition: template
- value_template: "{{ state_attr('light.living_room_torchere_e27','brightness') > 10 }}"
- - service: light.turn_on
- data_template:
- entity_id: light.living_room_torchere_e27
- brightness: >
- {% set target = state_attr('light.living_room_torchere_e27','brightness') - 10 %}
- {% if target < 10 %}
- 1
- {% else %}
- {{ target }}
- {% endif %}
- - delay: 00:00:01
- - service: script.fade_torchere_delay
- fade_torchere_delay:
- alias: Loop Fade Torchere
- sequence:
- - delay:
- milliseconds: 1
- - service: script.fade_torchere
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement