architecture
architecture copied to clipboard
Add area support to templates
Context
Area support was recently added and provides a consistent way to group sensors by physical location. Accessing area names in templates doesn't seem possible currently, so to (say) access the location of a sensor in a template you must still rely on parsing its name (or some other attribute).
Proposal
Add a area_name(entity) function that returns the area associated with entity.
The concept of areas is nice, but areas are not as well integrated in home assistant as entities. You can't access an area in templates, you can't use them in cards and so on. The workaround is to care of light groups or groups in general. But why? The devices are already grouped in areas! I want to control all climates, lights, media, ... in one area, without grouping them. But I want to assign groups in areas, or have groups for just grouping up things - decoupled from any area.
One step closer with https://github.com/home-assistant/core/pull/42221
This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions.
For that reason, I'm going to close this issue.
../Frenck