#Trigger from YAML automation get's disabled automatically
1 messages · Page 1 of 1 (latest)
Have you tried just creating the trigger through the UI and seeing if that works?
after duplicating the automation so i can edit it via the UI the trigger does not seem disabled
creating a new automation with the same content or just the trigger doesn't work either
(via YAML)
That usually means that you have a syntax error somewhere in your configuration that prevents HA from setting up the trigger
it looks fine to me and i also didn't get any repairs or errors but maybe i'm just missing something
alias: Holiday Shopping Notification
description: >-
Checks daily if I plan to go shopping the next day. It will
send a notification, if there's a holiday on that day so I
can do the shopping before that.
id: 019a67f2-b6fc-7993-971c-90f8d11ae491
mode: single
triggers:
- trigger: time
at: "06:30:00"
conditions:
- condition: template
value_template: |-
{% from "calendar.jinja" import event_is_coming_up %}
{% set calendar_entity = "sensor.calendar_events_tomorrow" %}
{% set events = state_attr(calendar_entity, "data") %}
{# check upcoming event by the name #}
{{ bool(event_is_coming_up(events, "Einkaufen")) }}
- condition: template
value_template: |-
{% from "calendar.jinja" import event_is_coming_up %}
{% set calendar_entity = "sensor.calendar_events_tomorrow" %}
{% set events = state_attr(calendar_entity, "data") %}
{# check upcoming event by the description #}
{{ bool(event_is_coming_up(events, "", "Rheinland-Pfalz")) }}
actions:
- action: script.send_notification
data:
platform: [pc, smartphone]
message: >-
Be aware that there's a holiday tomorrow when you want
to go shopping. You might want to go today instead :)
I'm not sure why it says "(Disabled)" for the triggers in the UI. All of mine do, but they all work fine
Including the time-based triggers. I just had one trigger this morning, just as it does every day
It only shows that for automations that aren't in automations.yaml for me, but doesn't seem to have any bearing on whether they trigger. Seems like just a cosmetic bug
I created a simple automation in the UI and it doesn't say "(Disabled)", then moved it to my second YAML file, and it said "(Disabled}", but the time trigger triggered as expected