I’m building a Blueprint to help me control my various lights with various motion sensors.
I’m setting the Blueprint up to take a domain light target, which could be an area or set of lights. I would like to read the state of these lights similar to a group of lights and/or filter them down to only lights that are currently on, so I can do a service call to light.turn_on to change the brightness of those lights that are already on, without turning on the other lights in the target group.
Is this possible? If so, how can I achieve that? Thank you!
Using scene.apply isn’t possible, because of the way that it needs to be invoked:
// Real way of having to invoke scene.apply
service: scene.apply
data:
entities:
some_light:
brightness: 50
some_other_light:
brightness: 50
// How it would have to be invokeable to make it possible to use it with `targets`
service: scene.apply
data:
target: my_target
apply:
brightness: 50
It might be useful to expand (pun intended) the functionality to include expanding targets to a list of entities that match the target criteria.
Manually “parsing” the target object.
It wasn’t clear to me how to go from area_id or device_id to entity_id. If this is possible I would love to understand how.
Any advice on how else to achieve this greatly appreciated.