True, but I usually have multiple triggers. For example:
trigger:
- platform: homeassistant
event: start # in case the states aren't properly restored
- platform: event
event_type: automation_reloaded # in case automations reload
- platform: time
at:
- "07:30:00" # Turn on light in the morning
- "00:00:05" # Turn off light a couple seconds after midnight
- platform: sun # Turn off light half hour after sunrise
event: sunrise
offset: "00:30:00"
- platform: sun # Turn on light half hour before sunset
event: sunset
offset: "-00:30:00"
A general delay for all triggers is not what I want.
And yes, I know that I can use a trigger id to later get the actual trigger back that fired, but that makes it more complicated.
If your automation is using five triggers it must already contain a choose to determine which one of the triggers occurred. It’s not more complicated than adding another conditions to it.
Well in my case it’s actually is not quite that easy. The home assistant start trigger is not part of my choose conditions.
Like this
- choose:
- conditions:
condition: or
conditions:
- condition: time # Condition to turn on in the morning
after: "07:25:00"
before: "08:35:00"
- condition: sun # Condition to turn on in the evening
after: sunset
after_offset: "-00:45:00"
sequence:
- service: light.turn_on
entity_id: light.inside
- service: light.turn_on
entity_id: light.outside # christmas light string in hedge
default:
- service: light.turn_off
entity_id: light.inside
- service: light.turn_off
entity_id: light.outside # christmas light string in hedge
But that’s irrelevant. I know I can get it working with the available tools. I just thought the ‘offset’ parameter would make a usefull addition. Usefull in a lot of circumstances.