I’m having loads of fun with the presence part of Home Assistant. I have the Life360 app on my Android phone, and my wife and two kids have an iPhone that I track with the excellent iCloud3 component for Home assistant. And I have a couple of Raspberry Pi’s with Monitor.sh in my house to track the presence of the bluetooth signals of our phones and of my Mi Band 3.
Now I would like to switch off all the lights when the last person leaves the house. So I configured the members of our family with the new Person component like this:
person.dad -> device_tracker.life360 + device_tracker.bt
person.mum -> device_tracker.icloud + device_tracker.bt
person.child1 -> device_tracker.icloud + device_tracker.bt
person.child2 -> device_tracker.icloud + device_tracker.bt
And I configured a template like this in my configuration.yaml:
- platform: template
sensors:
people_home:
friendly_name: 'People Home'
device_class: presence
value_template: >
{{ is_state('person.husband', 'home') or
is_state('person.wife', 'home') or
is_state('person.kid1', 'home') or
is_state('person.kid2', 'home') }}
So now I got a “binary_sensor.people_home” that is ‘on’ or ‘off’. I made an automation to switch off all my lights when the binary_sensor switches to off.
I read https://www.home-assistant.io/components/person/ about how smart the person component is with a combination of bluetooth and GPS based device trackers.
But still: when my wife is at home, and the Bluetooth sensor switches to off because her phone is out of reach of my bluetooth monitors so the device_tracker.wife_bluetooth switches to not_home, her person.wife is still “home”, but the binary_sensor.people_home is switches to ‘off’. And the lights turn off
So it seems that the last change in one of the device trackers decides the state of the binary sensor… Since her icloud3 devicetracker still says home the binary sensor should stay on I think… but it doesn’t work that way?
That is not how it is described in the https://www.home-assistant.io/components/person/ documentation.
Am I doing something wrong or is this a bug?