Add PresenceEntity
for the device_tracker
platform
#831
Replies: 3 comments 3 replies
-
Why would latitude and longitude be interesting? Battery level should not be added. That's a separate sensor measurement. Why is this better than a binary sensor? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Reviving this discussion, as I had a similar thought to this.... If a network management system like Unifi or TP-Link Omada manages a set of wi-fi access points in an environment, it's possible to work out roughly where each wi-fi client on the network is located, based on which access point is being used by each device. From my tests, this works pretty well for giving a rough location for a person in my home (e.g. living room, garden, kitchen) even without fast-roaming APs. As the Device Tracker entity type includes a Location name attribute, and doesn't require a GPS coordinate, it feels like this nearly fits in with the intended usage. But you may not agree, or it may have unexpected side effects... So, I think we could solve this with a third type of device tracker, but I'm not sure I'd vote for the name Presence Entity. Honestly, I'm not sure how much milage there is in creating automations based on approximate locations, but it seems like something that people might find useful for things like lighting or heating, or as a second source of truth, e.g. "Occupancy detected in living room AND only my iPhone close to the living room, then activate Karaoke mode". I'm limited by my imagination for automations. Another possible problem would be the approximate nature of the location updates based on whether a device decided to roam to the nearer AP might confuse users. The other idea I had for achieving this was using the Device's area of the current access point, and updating the Area of each Device Scanner based on which AP it has been connected to. However, I'm not sure that the Device Scanners even have Areas, if they can be easily changed dynamically, and how useful that would be for any integrations other than dashboards. |
Beta Was this translation helpful? Give feedback.
-
Context
The
device_tracker
already has theScannerEntity
and theTrackerEntity
, both used to track persons.To track room presence this is not on option.
A current implementations like
mqtt_room
implement asensor
entity withextra_state_attributes
which is not scalable. Other implementation use thebinary_sensor
platform.Proposal
To track the use of rooms it would be great to have a
PresenceEntity
the state indicatespresence
if there is someone presence in the room andno_presence
if the room is empty.This seems a better alternative than the current
sensors
andbinary_sensors
that implement room presence.Suggested attributes are:
source_type
(required)location_name
(optional)latitude
andlongitude
(optional)battery_level
(optional)Aim
The
PresenceEntity
allows integrations to link the person's location to a room.Beta Was this translation helpful? Give feedback.
All reactions