Improve modeling of room presence

Areas are normally used to represent rooms; e.g. Living Room, Bedroom, etc. Groups are sometimes also used, but Area seems more common. Zones are used for relatively large geographic regions, e.g. Home or School. Device Trackers have a state that is the name of a zone. Device Trackers can be associated with Persons.

This structure makes it difficult to model room presence; e.g. to be able to say that Person X is currently in the Living Room. AFAICT one has to either:

  1. Create a Zone for each room, which is awkward because Zones are circular rather than polygonal, and also don’t naturally contain devices/entities the way Areas do. This also requires some fairly complex setup with templated Device Trackers to get various sensors to feed into the tracker’s location_name.

  2. Create presence sensors for each room x person combination. This seems to be the more common approach, but has no direct link to the Person entities.

Feature Request: Better data structures to represent room presence.

Ideally there would exist a native Room component that exists beneath Area in the hierarchy, i.e. Zone > Area > Room > Device > Entity. For example: Home > Downstairs > Living Room. Rooms could optionally have polygonal geographic boundaries.

An alternative would be to allow Areas to have polygonal geographic boundaries, i.e. a list of lat/long coords.

There then needs to be an easier way to associate a person with an Area/Room.

One possibility is to give Person an explicit area/room state, which can be defined using various sensors, in addition to Device Trackers. That might be tricky to reconcile with the current device-tracker-only configuration.

Another option would be to have Device Trackers support Areas/Rooms in addition to Zones. It should similarly be easier to define a device tracker based on existing sensors.

Tangent request but uniquely separated from this specific one: