Domain determination in automation

I’m new to node-red so I’m sure there is probably an easy answer to this I just haven’t found. In an effort to turn on lights/switches in a room based on presence, I am sending a service request to a group of lights/switches. However, I need multiple service requests for each room since some rooms have lights, and switches. The light service call doesn’t like switches and the switch service call doesn’t seem to like lights. I want to make a sub-flow that determines the type of device and sends the appropriate service call based on it’s domain.
Any help would be appreciated.
thanks

Use the homeassistant domain in the service call it doesn’t care about the actual domain of the device.

https://www.home-assistant.io/docs/scripts/service-calls/#homeassistant-services

1 Like

Awesome,
Thanks for the quick response.