diff --git a/README.md b/README.md index 93cbc8c..e1163ed 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/custom_components/composite/device_tracker.py b/custom_components/composite/device_tracker.py index 847c1c7..8258b5f 100644 --- a/custom_components/composite/device_tracker.py +++ b/custom_components/composite/device_tracker.py @@ -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 ( @@ -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]