@Lemmee you could try using the parallel building block.
homeassistant
Home Assistant is open source home automation that puts local control and privacy first.
Powered by a worldwide community of tinkerers and DIY enthusiasts.
Home Assistant can be self-installed on ProxMox, Raspberry Pi, or even purchased pre-installed: Home Assistant: Installation
Discussion of Home-Assistant adjacent topics is absolutely fine, within reason.
If you're not sure, DM @GreatAlbatross@feddit.uk
Oh interesting! I didn’t even know that existed. That definitely seems like the right choice! Thanks for the tip
I remember searching for a similar workaround in the past. I'm not sure parallel will work because the whole automation is blocked on error if I recall correctly. A workaround I found suggested on the ha website (but never tried) was to put the command that may error in a script and run the script as "fire and forget" from the automation. If the automation doesn't wait for the script to finish it won't detect the error either. But, as other pointed out, try to make the zigbee network more stable first.
I would look at making your ZigBee network reliable, as changing the automation is just fixing the symptom not the cause.
I would move your WiFi channel from 1 to 6 or 11 and see if that helps?
Also, since zigbee is a mesh network, the fix could be as easy as adding a smart plug halfway between the controller and the light. Every zigbee device not running on battery works as a repeater too
FYI: not all mains powered devices are routers, I have some light switches that are end devices only.
But in general, yes most mains powered devices are routers and will help with getting the network to reach
I think I've mostly run across that with "no neutral" switches FWIW. It was confusing for a bit when setting up my garage.
Also very frustrating info to try and track down when buying sometimes.
You can try adding
continue_on_error: true
to the scene action so it doesn’t kill the entire automation. Note that if later parts depend on this action then they’ll fail in weird ways. The best thing is to fix the Zigbee network so the device doesn’t drop off but I know that’s not easy.
I might give this a try while I work on the actual underlying cause. The rest of the automation isn’t impacted. It just turns the lights a color when it starts, then resets the color when the automation finishes.