From e7b82893717bd330306b62dd5455400099043858 Mon Sep 17 00:00:00 2001 From: Victor Vostrikov <1998617+gorynychzmey@users.noreply.github.com> Date: Thu, 28 Feb 2019 08:03:31 +0100 Subject: [PATCH 1/7] Added description for source priority. --- source/_components/person.markdown | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/_components/person.markdown b/source/_components/person.markdown index 6a0782635c80..ca118e5c1b74 100644 --- a/source/_components/person.markdown +++ b/source/_components/person.markdown @@ -13,7 +13,11 @@ ha_qa_scale: internal ha_release: 0.88 --- -The person component allows to connect device tracker entities to one or more person entities. The last state update of a connected device tracker will set the state of the person. For example if you connect your router and your OwnTracks device as trackers to your person, the last state update from either the router or your OwnTracks device will set the state of your person. +The person component allows to connect device tracker entities to one or more person entities. The state updates of a connected device trackers will set the state of the person. When multiple device tracers used, the state of berson will be determined next way: + +1. If there are sources presenting status 'home', than latest of this sources will be taken. +2. If there are sources of type 'gps', than latest of this sources will be taken. +3. Otherwise will be taken latest source with status 'not_home'. You can manage persons via the UI from the person page inside the configuration panel or via `YAML`. From 142c6015d248daa98a9c2df9f75369370b1812c6 Mon Sep 17 00:00:00 2001 From: Victor Vostrikov <1998617+gorynychzmey@users.noreply.github.com> Date: Thu, 28 Feb 2019 12:24:26 +0100 Subject: [PATCH 2/7] Changed description of source priority. --- source/_components/person.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/person.markdown b/source/_components/person.markdown index ca118e5c1b74..5409dbe763d4 100644 --- a/source/_components/person.markdown +++ b/source/_components/person.markdown @@ -15,7 +15,7 @@ ha_release: 0.88 The person component allows to connect device tracker entities to one or more person entities. The state updates of a connected device trackers will set the state of the person. When multiple device tracers used, the state of berson will be determined next way: -1. If there are sources presenting status 'home', than latest of this sources will be taken. +1. If there are stationary sources (which type is not 'gps') presenting status 'home', than latest of this sources will be taken. 2. If there are sources of type 'gps', than latest of this sources will be taken. 3. Otherwise will be taken latest source with status 'not_home'. From 6d1b70c7958fbef928d5ab6a9c6cdf0e9c6b0ab5 Mon Sep 17 00:00:00 2001 From: Victor Vostrikov <1998617+gorynychzmey@users.noreply.github.com> Date: Thu, 28 Feb 2019 12:55:27 +0100 Subject: [PATCH 3/7] Added example of sources' choice. --- source/_components/person.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/_components/person.markdown b/source/_components/person.markdown index 5409dbe763d4..ab2373cfc40c 100644 --- a/source/_components/person.markdown +++ b/source/_components/person.markdown @@ -19,6 +19,16 @@ The person component allows to connect device tracker entities to one or more pe 2. If there are sources of type 'gps', than latest of this sources will be taken. 3. Otherwise will be taken latest source with status 'not_home'. +Lets say for example, that you have 3 trackers: 'tracker_gps', 'tracker_router' and 'tracker_ble'. + +1. You're at home, all 3 devices shows status 'home' - status of your Person entity will be 'home' with source 'tracker_gps'. +2. You're going out. 'tracker_gps' shows status 'not_home', but other two trackers show status 'home' according to their setting 'consider_home'. You are still considered to be at home. +3. After some time both stationary trackers show status 'not_home'. Now your Person entity has status 'not_home' with source 'tracker_gps'. +4. While you are outside your home, your Home Assistant was suddenly restarted. Until 'tracker_gps' receives update, your status will be determined by stationary tracker, which gets latest update after restart. Obviously the status will be 'not_home'. +5. Than you're going into area marked as 'zone1', 'tracker_gps' is getting update, and now your status is 'zone1' with source 'tracker_gps'. +6. You've returned home, and your mobile device has connected to router, but GPS update yet didn't occur. Your status will be 'home' with source 'tracker_router'. +7. After GPS update occurs, your status still be 'home' with source 'tracker_router' or 'tracker_ble', whatever updates later. + You can manage persons via the UI from the person page inside the configuration panel or via `YAML`. ## {% linkable_title Configuring the `person` component via the Home Assistant configuration panel %} From da109de85388e2aef935112e665dba54626e30e0 Mon Sep 17 00:00:00 2001 From: Victor Vostrikov <1998617+gorynychzmey@users.noreply.github.com> Date: Thu, 28 Feb 2019 13:42:20 +0100 Subject: [PATCH 4/7] Corrected example --- source/_components/person.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/person.markdown b/source/_components/person.markdown index ab2373cfc40c..4c7e2325d41a 100644 --- a/source/_components/person.markdown +++ b/source/_components/person.markdown @@ -21,7 +21,7 @@ The person component allows to connect device tracker entities to one or more pe Lets say for example, that you have 3 trackers: 'tracker_gps', 'tracker_router' and 'tracker_ble'. -1. You're at home, all 3 devices shows status 'home' - status of your Person entity will be 'home' with source 'tracker_gps'. +1. You're at home, all 3 devices shows status 'home' - status of your Person entity will be 'home' with source 'tracker_router' or 'tracker_ble', whatever was latest. 2. You're going out. 'tracker_gps' shows status 'not_home', but other two trackers show status 'home' according to their setting 'consider_home'. You are still considered to be at home. 3. After some time both stationary trackers show status 'not_home'. Now your Person entity has status 'not_home' with source 'tracker_gps'. 4. While you are outside your home, your Home Assistant was suddenly restarted. Until 'tracker_gps' receives update, your status will be determined by stationary tracker, which gets latest update after restart. Obviously the status will be 'not_home'. From 7e374601648377128b92f649fc20bd28d4d80435 Mon Sep 17 00:00:00 2001 From: Victor Vostrikov <1998617+gorynychzmey@users.noreply.github.com> Date: Thu, 28 Feb 2019 13:48:29 +0100 Subject: [PATCH 5/7] Added TL;DR to example --- source/_components/person.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/_components/person.markdown b/source/_components/person.markdown index 4c7e2325d41a..20f0d7e558cd 100644 --- a/source/_components/person.markdown +++ b/source/_components/person.markdown @@ -29,6 +29,8 @@ Lets say for example, that you have 3 trackers: 'tracker_gps', 'tracker_router' 6. You've returned home, and your mobile device has connected to router, but GPS update yet didn't occur. Your status will be 'home' with source 'tracker_router'. 7. After GPS update occurs, your status still be 'home' with source 'tracker_router' or 'tracker_ble', whatever updates later. +TL;DR: When you're at home, your position is determined by stationary tracker. When you're outside your home, your position is determined firstly by GPS and then by stationary device. + You can manage persons via the UI from the person page inside the configuration panel or via `YAML`. ## {% linkable_title Configuring the `person` component via the Home Assistant configuration panel %} From e936a4f72edfff194bb39fea8697b28ddaa4e7ff Mon Sep 17 00:00:00 2001 From: Victor Vostrikov <1998617+gorynychzmey@users.noreply.github.com> Date: Thu, 28 Feb 2019 13:51:09 +0100 Subject: [PATCH 6/7] Updated TL:DR --- source/_components/person.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/person.markdown b/source/_components/person.markdown index 20f0d7e558cd..238e47147017 100644 --- a/source/_components/person.markdown +++ b/source/_components/person.markdown @@ -29,7 +29,7 @@ Lets say for example, that you have 3 trackers: 'tracker_gps', 'tracker_router' 6. You've returned home, and your mobile device has connected to router, but GPS update yet didn't occur. Your status will be 'home' with source 'tracker_router'. 7. After GPS update occurs, your status still be 'home' with source 'tracker_router' or 'tracker_ble', whatever updates later. -TL;DR: When you're at home, your position is determined by stationary tracker. When you're outside your home, your position is determined firstly by GPS and then by stationary device. +TL;DR: When you're at home, your position is determined firstly by stationary trackers (if any) and then by GPS. When you're outside your home, your position is determined firstly by GPS and then by stationary trackers. You can manage persons via the UI from the person page inside the configuration panel or via `YAML`. From a89ba7d9a26afede3fccb142360d66f6d163a0ca Mon Sep 17 00:00:00 2001 From: Victor Vostrikov <1998617+gorynychzmey@users.noreply.github.com> Date: Thu, 28 Feb 2019 15:38:45 +0100 Subject: [PATCH 7/7] Added hint for consider_home --- source/_components/person.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_components/person.markdown b/source/_components/person.markdown index 238e47147017..6295e772ced6 100644 --- a/source/_components/person.markdown +++ b/source/_components/person.markdown @@ -31,6 +31,10 @@ Lets say for example, that you have 3 trackers: 'tracker_gps', 'tracker_router' TL;DR: When you're at home, your position is determined firstly by stationary trackers (if any) and then by GPS. When you're outside your home, your position is determined firstly by GPS and then by stationary trackers. + +**Hint**: When you use multiple device trackers together, especially stationary and GPS trackers, it's advisable to set `consider_home`for stationary trackers as low as possible. + + You can manage persons via the UI from the person page inside the configuration panel or via `YAML`. ## {% linkable_title Configuring the `person` component via the Home Assistant configuration panel %}