#Creating a generic light group that would apply to all areas

1 messages · Page 1 of 1 (latest)

fierce shuttle
#

Hey guys, I couldn't find anything on this issue specifically and just wanted to see if anyone has tried something like this before.

In most of the rooms in my house, I have downlights and lamps. There are times when I'd like the downlights on vs the lamps, and I'm looking to create automations for this using AlexaMediaPlayer (or an alternative that would be aware of the area that it belongs to).

The idea being that all of the areas in my house would have 2 generic device groups (downlights and lamps), that way regardless of the area, they would all have these device groups available, and the automations would just need to know the area related to the calling alexa device, in order to turn on the downlights for example.

To my mind, extending the area type in some way to add the device groups would be the easiest solution, but I have no idea if this is possible, or if I'm looking at this from the wrong direction, so I'd appreciate any advice or pointers at all.

Thanks!

oak timber
#

You can do this currently, it's a bit messy (though work is being done to improve it afaik) and requires templating and labels

#

Though tbh you don't even need the labels for this exact use case, I just think they're neater!

#

With templates you can find the area of the entity that triggered the automation (area_name(entity_id)), and then get a list of all the entities in that area (area_entities(area_name)) which you can then filter depedning on if they have certain labels, or have downlight/lamp in their id or whatever

fierce shuttle
#

Nice!!!! Thanks for the info @oak timber.

lost wraith
#

Keep in mind the areas that hilburn refers to are the areas defined in Home Assistant, not the areas defined in your Alexa app