mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-20 16:21:58 +00:00
Let there be light - But not too much at night.
This commit is contained in:
parent
38cd217210
commit
f16fe1fe4c
@ -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
|
Loading…
x
Reference in New Issue
Block a user