diff --git a/automation/time_8pm_5am.yaml b/automation/time_8pm_5am.yaml index cb2c454d..f84fb2a5 100755 --- a/automation/time_8pm_5am.yaml +++ b/automation/time_8pm_5am.yaml @@ -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 \ No newline at end of file + brightness: 20 \ No newline at end of file