im looking for a way to show the status of lighting in areas on the dashboard - while also being able to use the this to control lights in those areas.
For example using switches:
All lights: [Switch showing ON if any light in any area is ON, actuating this switch will turn ON / OFF all lights]
Bathroom [Switch showing ON if any light in the area “Bathroom” is ON, actuating this switch will turn ON / OFF all lights in Barhtoom]
etc…
As I have a lot of lights I would prefer to not create groups by hand. Is it possible to automatically select all lights of a given area?
Copy-paste the following template in the Template Editor, change kitchen to the name of an area in your system, and confirm it reports a list of all light entities in that area.
{{ area_entities('kitchen') | select('match', 'light') | list }}