I’m trying to get an automation running, but can’t figure out, what I’m doing wrong. It triggers, if I call it from the dev-panel, but not automatically. Config check says everything ok, restarted Hass.io, automation is ‘on’…
I’m stuck, that’s not surprising, I’m new to HA…
Here’s the automation:
alias: Aufwachen
trigger:
platform: time_pattern
minutes: /1
seconds: 0
condition:
- condition: template
value_template: "{{ states('input_boolean.alarm_clock_ha_on') == 'on' }}"
- condition: template
value_template: "{{ states('input_boolean.night_mode') == 'on' }}"
- condition: template
value_template: "{{ states('sensor.time') >= '22:30' | timestamp_custom('%H:%M', true) or states('sensor.time') <= '12:30' | timestamp_custom('%H:%M', true) }}"
- condition: template
value_template: >
{% if 'states.input_datetime.alarm_clock_pat_time.attributes.timestamp' is le 'states.input_datetime.alarm_clock_steffi_time.attributes.timestamp' %}
{{ ((as_timestamp(now()) + 300) | timestamp_custom('%H:%M:%S', true)) == 'states.input_datetime.alarm_clock_pat_time' }}
{% else %}
{{ ((as_timestamp(now()) + 300) | timestamp_custom('%H:%M:%S', true)) == 'states.input_datetime.alarm_clock_steffi_time' }}
{% endif %}
action:
- service: input_boolean.turn_off
entity_id: input_boolean.night_mode
Thanks a lot for any assistance!