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

This commit is contained in:
CCOSTAN
2016-10-30 13:27:41 +00:00
parent f16fe1fe4c
commit b0631261c1
3 changed files with 8 additions and 6 deletions

View File

@@ -23,9 +23,11 @@
- condition: template
value_template: "{{ trigger.event.data.new_state.state == 'on' }}"
- condition: template
value_template: "{{ trigger.event.data.new_state.attributes is not none }}"
value_template: "{{ trigger.event.data.old_state.state == 'off' }}"
- condition: template
value_template: "{{ trigger.event.data.new_state.attributes.brightness|default(0)|int > 50 }}"
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 > 50 }}"
action:
- service: light.turn_on
data_template:

View File

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

View File

@@ -30,8 +30,8 @@
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 > 20 }}"
# - condition: template
# value_template: "{{ trigger.event.data.new_state.attributes.brightness|default(0)|int > 20 }}"
action:
- service: light.turn_on
data_template: