You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That older implementation is now referred to as the "legacy" implementation,
27
+
and is the one that creates and uses the `known_devices.yaml` file in HA's configuration folder.
28
+
29
+
Starting with the 2.4.0 release this integration now uses the newer entity-based implementation.
30
+
That implementation stores configuration and entity settings in HA's `.storage` folder,
31
+
and supports reconfiguring those items via the Integrations and Entities pages in the UI.
32
+
The initial configuration, though, is still done via YAML, and is "imported" and will show up
33
+
on the Integrations UI page as such.
34
+
In the future the integration will likely allow adding & fully reconfiguring composite trackers
35
+
via the UI.
36
+
37
+
To allow for a smoother transition, the integration currently still supports the older,
38
+
legacy implementation as well. If it sees entries under `device_tracker`, it will still create the
39
+
entities as before, but it will issue a warning and a persistent notification that the configuration
40
+
has changed and suggest how to edit your configuration accordingly.
41
+
42
+
At some point (i.e., in an upcoming 3.0.0 release) legacy support will be removed.
43
+
21
44
## Installation
22
45
### Manual
23
46
24
47
Place a copy of:
25
48
26
49
[`__init__.py`](custom_components/composite/__init__.py) at `<config>/custom_components/composite/__init__.py`
50
+
[`config_flow.py`](custom_components/composite/config_flow.py) at `<config>/custom_components/composite/config_flow.py`
27
51
[`const.py`](custom_components/composite/const.py) at `<config>/custom_components/composite/const.py`
28
52
[`device_tracker.py`](custom_components/composite/device_tracker.py) at `<config>/custom_components/composite/device_tracker.py`
29
53
[`manifest.json`](custom_components/composite/manifest.json) at `<config>/custom_components/composite/manifest.json`
@@ -33,7 +57,7 @@ where `<config>` is your Home Assistant configuration directory.
33
57
>__NOTE__: Do not download the file by using the link above directly. Rather, click on it, then on the page that comes up use the `Raw` button.
34
58
35
59
### With HACS
36
-
You can use [HACS](https://hacs.xyz/) to manage installation and updates by adding this repo as a [custom repository](https://hacs.xyz/docs/faq/custom_repositories/) and then searching for and installing the "Composite" integration.
60
+
You can use [HACS](https://hacs.xyz/) to manage installation and updates by adding this repo as a [custom repository](https://hacs.xyz/docs/faq/custom_repositories/).
37
61
38
62
### numpy on Raspberry Pi
39
63
@@ -44,7 +68,9 @@ sudo apt install libatlas3-base
44
68
>Note: This is the same step that would be required if using a standard HA component that uses numpy (such as the [Trend Binary Sensor](https://www.home-assistant.io/components/binary_sensor.trend/)), and is only required if you use `device_or_utc` or `device_or_local` for `time_as`.
45
69
46
70
## Configuration variables
47
-
### `composite` integration
71
+
72
+
- **trackers** (*Optional*): The list of composite trackers to create. For each entry see [Tracker entries](#tracker-entries).
73
+
NOTE: Once legacy support is removed, this variable, with at least one entry, will become required.
48
74
49
75
- **tz_finder** (*Optional*): Specifies which `timezonefinder` package, and possibly version, to install. Must be formatted as required by `pip`. Default is `timezonefinderL==4.0.2`. Other common values:
>Note: Starting with release 4.4.0 the `timezonefinder` package provides two classes to choose from: the original `TimezoneFinder` class, and a new class named `TimezoneFinderL`, which effectively replaces the functionality of the `timezonefinderL` package.
59
85
60
-
### `device_tracker` platform
86
+
### Tracker entries
61
87
62
88
- **entity_id**: Entity IDs of watched device tracker devices. Can be a single entity ID, a list of entity IDs, or a string containing multiple entity IDs separated by commas. Another option is to specify a dictionary with `entity` specifying the entity ID, and `all_states` specifying a boolean value that controls whether or not to use all states of the entity (rather than just the "Home" state, which is the default.)
63
-
- **name**: Object ID (i.e., part of entity ID after the dot) of composite device. For example, `NAME` would result in an entity ID of `device_tracker.NAME`.
89
+
- **name**: Friendly name of composite device.
90
+
- **id** (*Optional*): Object ID (i.e., part of entity ID after the dot) of composite device. If not supplied, then object ID will be generated from the `name` variable. For example, `My Name` would result in an entity ID of `device_tracker.my_name`.
64
91
- **require_movement** (*Optional*): `true` or `false`. Default is `false`. If `true`, will skip update from a GPS-based tracker if it has not moved. Specifically, if circle defined by new GPS coordinates and accuracy overlaps circle defined by previous GPS coordinates and accuracy then update will be ignored.
65
92
- **time_as** (*Optional*): One of `utc`, `local`, `device_or_utc` or `device_or_local`. Default is `utc` which shows time attributes in UTC. `local` shows time attributes per HA's `time_zone` configuration. `device_or_utc` and `device_or_local` attempt to determine the time zone in which the device is located based on its GPS coordinates. The name of the time zone (or `unknown`) will be shown in a new attribute named `time_zone`. If the time zone can be determined, then time attributes will be shown in that time zone. If the time zone cannot be determined, then time attributes will be shown in UTC if `device_or_utc` is selected, or in HA's local time zone if `device_or_local` is selected.
66
93
@@ -76,9 +103,9 @@ If a watched device has a `battery` or `battery_level` attribute, that will be u
76
103
77
104
## known_devices.yaml
78
105
79
-
The watched devices, and the composite device, should all have `track` set to `true`.
106
+
NOTE: This only applies to "legacy" tracker devices.
80
107
81
-
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).)
108
+
The watched devices, and the composite device, should all have `track` set to `true`.
82
109
83
110
## Attributes
84
111
@@ -101,17 +128,16 @@ time_zone | The name of the time zone in which the device is located, or `unknow
0 commit comments