If I run this automation manually via the UI, it turns on the devices in the group named a
. However, if I just restart home assistant, it doesn’t, presumably because the ZigBee coordinator integration is broken or its semantics are awful. I suppose I could just run a particular automation every 5 minutes or so, but it would be better if the “start” trigger would just … work.
IMHO, the only way the “start” event would make sense is if the ZigBee coordinator integration is fully initialized. Instead, it seems to work in some kind of asynchronous fashion, which as explained, means the start event is completely useless.
action:
- variables:
t: ({{ now().hour }},{{ now().minute }})
- service: switch.turn_{{ 'on' if t >= (18,30) or t < (5,30) else 'off' }}
target:
entity_id: group.a
alias: Scheduled switch A
condition: '{{ 1 <= now().isoweekday() <= 7 }}'
trigger:
- at:
- '18:49:10'
- '05:30:00'
platform: time
- event: start
platform: homeassistant