Skip to content

Commit 4581a2f

Browse files
committed
Bump version to 2.4.0b0
Update README.md.
1 parent 05b03a5 commit 4581a2f

File tree

2 files changed

+52
-26
lines changed

2 files changed

+52
-26
lines changed

README.md

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,46 @@ Follow the installation instructions below.
88
Then add the desired configuration. Here is an example of a typical configuration:
99

1010
```yaml
11-
device_tracker:
12-
- platform: composite
13-
name: me
14-
time_as: device_or_local
15-
entity_id:
16-
- device_tracker.platform1_me
17-
- device_tracker.platform2_me
18-
- binary_sensor.i_am_home
11+
composite:
12+
trackers:
13+
- name: Me
14+
time_as: device_or_local
15+
entity_id:
16+
- device_tracker.platform1_me
17+
- device_tracker.platform2_me
18+
- binary_sensor.i_am_home
1919
```
2020
21+
## Legacy vs entity-based implementation
22+
23+
When this integration was originally created the
24+
[Device Tracker](https://www.home-assistant.io/integrations/device_tracker/)
25+
component worked differently than it does today.
26+
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+
2144
## Installation
2245
### Manual
2346

2447
Place a copy of:
2548

2649
[`__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`
2751
[`const.py`](custom_components/composite/const.py) at `<config>/custom_components/composite/const.py`
2852
[`device_tracker.py`](custom_components/composite/device_tracker.py) at `<config>/custom_components/composite/device_tracker.py`
2953
[`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.
3357
>__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.
3458

3559
### 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/).
3761

3862
### numpy on Raspberry Pi
3963

@@ -44,7 +68,9 @@ sudo apt install libatlas3-base
4468
>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`.
4569

4670
## 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.
4874

4975
- **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:
5076

@@ -57,10 +83,11 @@ sudo apt install libatlas3-base
5783

5884
>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.
5985

60-
### `device_tracker` platform
86+
### Tracker entries
6187

6288
- **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`.
6491
- **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.
6592
- **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.
6693

@@ -76,9 +103,9 @@ If a watched device has a `battery` or `battery_level` attribute, that will be u
76103

77104
## known_devices.yaml
78105

79-
The watched devices, and the composite device, should all have `track` set to `true`.
106+
NOTE: This only applies to "legacy" tracker devices.
80107

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`.
82109

83110
## Attributes
84111

@@ -101,17 +128,16 @@ time_zone | The name of the time zone in which the device is located, or `unknow
101128
composite:
102129
tz_finder: timezonefinder<6
103130
tz_finder_class: TimezoneFinderL
104-
device_tracker:
105-
- platform: composite
106-
name: me
107-
time_as: device_or_local
108-
require_movement: true
109-
entity_id:
110-
- device_tracker.platform1_me
111-
- device_tracker.platform2_me
112-
- device_tracker.router_my_device
113-
- entity: binary_sensor.i_am_home
114-
all_states: true
131+
trackers:
132+
- name: Me
133+
time_as: device_or_local
134+
require_movement: true
135+
entity_id:
136+
- device_tracker.platform1_me
137+
- device_tracker.platform2_me
138+
- device_tracker.router_my_device
139+
- entity: binary_sensor.i_am_home
140+
all_states: true
115141
```
116142

117143
### Time zone examples

custom_components/composite/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"domain": "composite",
33
"name": "Composite",
4-
"version": "2.3.0",
4+
"version": "2.4.0b0",
55
"documentation": "https://github.com/pnbruckner/ha-composite-tracker/blob/master/README.md",
66
"issue_tracker": "https://github.com/pnbruckner/ha-composite-tracker/issues",
77
"requirements": [],

0 commit comments

Comments
 (0)