Let there be light - But not too much at night.

This commit is contained in:
CCOSTAN 2016-10-30 06:02:26 +00:00
parent 38cd217210
commit f16fe1fe4c

View File

@ -26,12 +26,14 @@
value_template: "{{ trigger.event.data.new_state.state is not none }}"
- condition: template
value_template: "{{ trigger.event.data.new_state.state == 'on' }}"
- condition: template
value_template: "{{ trigger.event.data.old_state.state == 'off' }}"
- condition: template
value_template: "{{ trigger.event.data.new_state.attributes is not none }}"
- condition: template
value_template: "{{ trigger.event.data.new_state.attributes.brightness|default(0)|int > 254 }}"
value_template: "{{ trigger.event.data.new_state.attributes.brightness|default(0)|int > 20 }}"
action:
- service: light.turn_on
data_template:
entity_id: "{{ trigger.event.data.entity_id }}"
brightness: 255
brightness: 20