I’m trying to figure out a way to use NodeRed Presence-Faker to randomly turn lights on and off in the house. My catch is that I would like to identify a handful of lights (say 5 or 6) and have at minimum 2 of the lights on at any given moment.
Currently, I find that I need to connect Presence-Faker to a given light, so essentially 5 different Presence-Fakers for 5 different lights. But in that configuration, they all work independently and consequently I can have all 5 off at any given moment.
But based on the HA Group docs, this is “Old Style Groups” and are no longer recommended. I tried in a Group Helper, but cannot seem to include both light and switch entities within the same group.
Is there some other mechanism that I am not aware of that would allow me to group different objects together?
Is there any way to retrieve Entities in NodeRed and filter by Label? I don’t see any labels in the JSON payloads returned by the GetEntities node.
Thanks! I saw that after I posted. I ended up creating different groups with the same label, and then some twisted logic in NR to fetch the different groups by label, and then flatten the entity_ids, then fetch the entity_ids by state. Not sure it is the nicest option available, but seeming it is functional.