Changing status of multiple switches?

Hi,
I´m trying to schedule Node red to turn on/off motion detection and videostreamin for 2 cameras connected via motioneye.
But I can´t seem to get all to change at once, it works if I disconnect a few outputs from switch node, but with all connected at least one fails and if I look at logs in home assistant, that entity shows nothing so doesnt seem to get into HA. Do I need to add a delay or is there another way of doing this?

You can remove the switch node and condense it down to a single call-service node.

I’m assuming the switch node is checking if msg.payload equals turn_off or turn_on.

The entity id field of the call-service node accepts a comma-delimited list of entity ids and the service field accepts mustache templates.

image

Ahh! Thanks, my workspace will be much cleaner now…:slight_smile:
BUT I tried, and for a few entities it works fine, but with all of them in there, a few wont trigger. If I remove some, it works. Debug output in node red say it sends trigger, but in HA logs, I see nothing for that entity…:frowning:

You sure you have the correct spellings? Did you try to see if the service call works in the HA dev tools?