Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: test
- mode: single
- variables:
- entities:
- - light.keittionvalo
- - light.olohuone_kattolamppu
- brightness_pct: 50
- sequence:
- - repeat:
- for_each: "{{ entities }}"
- sequence:
- if:
- - condition: template
- value_template: "{{ is_state(repeat.item, 'off') or state_attr(repeat.item, 'brightness')|int < (brightness_pct/100) * 255 }}"
- then:
- - service: light.turn_on
- data:
- transition: 2
- brightness_pct: "{{ brightness_pct }}"
- color_temp: 300
- target:
- entity_id: "{{ repeat.item }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement