Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ If a watched device has a `battery` or `battery_level` attribute, that will be u

The watched devices, and the composite device, should all have `track` set to `true`.

It's recommended, as well, to set `hide_if_away` to `true` for the watched devices (but leave it set to `false` for the composite device.) This way the map will only show the composite device (of course when it is out of the home zone.) **NOTE:** The downside to hiding the watched devices, though, is that their history (other than when they're home) will not get recorded and hence will not be available in history views. (In history views they will appear to always be home.) Also they are hidden *everywhere* in the UI when not home (not just the map.)

Lastly, it is also recommended to _not_ use the native merge feature of the device tracker component (i.e., do not add the MAC address from network-based trackers to a GPS-based tracker. See more details in the [Device Tracker doc page](https://www.home-assistant.io/components/device_tracker/#using-gps-device-trackers-with-local-network-device-trackers).)
It is recommended to _not_ use the native merge feature of the device tracker component (i.e., do not add the MAC address from network-based trackers to a GPS-based tracker. See more details in the [Device Tracker doc page](https://www.home-assistant.io/components/device_tracker/#using-gps-device-trackers-with-local-network-device-trackers).)

## Attributes

Expand Down
3 changes: 1 addition & 2 deletions custom_components/composite/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
ATTR_BATTERY, ATTR_SOURCE_TYPE, PLATFORM_SCHEMA,
SOURCE_TYPE_BLUETOOTH, SOURCE_TYPE_BLUETOOTH_LE, SOURCE_TYPE_GPS,
SOURCE_TYPE_ROUTER)
from homeassistant.components.device_tracker.const import ENTITY_ID_FORMAT
from homeassistant.components.zone import ENTITY_ID_HOME
from homeassistant.components.zone import async_active_zone
from homeassistant.const import (
Expand Down Expand Up @@ -87,7 +86,7 @@ def __init__(self, hass, config, see):
SOURCE_TYPE: None,
DATA: None}
self._dev_id = config[CONF_NAME]
self._entity_id = ENTITY_ID_FORMAT.format(self._dev_id)
self._entity_id = f"device_tracker.{self._dev_id}"
self._time_as = config[CONF_TIME_AS]
if self._time_as in [TZ_DEVICE_UTC, TZ_DEVICE_LOCAL]:
self._tf = hass.data[DOMAIN]
Expand Down