Select multiple switch entities to link their on/off state. If any selected switch entity is turned on or off, the other selected entities will be sent a matching on or off command.
Requires Home Assistant 2022.5.0 or newer to allow the selection of multiple entities.
I’ve generalized this blueprint to allow the selection of any entities that can be turned on or off via the homeassistant service. Head over here to grab the new blueprint that now supports multiple entities of mixed domains!
I need a script like yours, but sadly this works only with switches, I need to sync lights and switches, the previous one you used as base should to this, sadly it didn’t work for me.
The last condition for me causes a 30% of failures in the sync of the entities.
I think is not usefull and when removed everything works fine becasue the save exist if on the state
Also I was getting a lot of errors for devices going into unavailable state so I added this: