You can also use groups as your targets. I have something very similar shown below.
#Turn on other switches when great room light is turned on.
- alias: 'Rule 12 Slave outlets to GreatRoom On'
trigger:
platform: state
entity_id: switch.great_room_lights_switch
from: 'off'
to: 'on'
action:
service: homeassistant.turn_on
entity_id: group.gr_light_slaves
#Turn on other switches when great room light is turned on.
- alias: 'Rule 13 Slave outlets to GreatRoom OFF'
trigger:
platform: state
entity_id: switch.great_room_lights_switch
from: 'on'
to: 'off'
action:
service: homeassistant.turn_off
entity_id: group.gr_light_slaves
This was the issue, I always had them active - manually re-enabled all of them ant now I’m good. Thanks for pointing out what I already read but I disregarded.
If you don’t set this the previous state is restored. If you shut Home Assistant down before it finishes starting, the automation will be stored as being off, and your automations will be disabled at the next startup.
I have some automations disabled depending on the state of an input select (automation mode: normal, guest, away, etc…).
To make sure the correct automations are enabled at start up I check the state of the input select during a startup triggered automation and call the corresponding script that sets the correct states.
99 times out of 100 this isn’t needed as I’m careful to make sure HA has fully started before shutting down.
This is absolute insanity. My wife, while cleaning, unplugged my HA system and plugged it back in twice with a minute. All of my automatons quick working including fire and security.