the Homekit integration in Home assistant. You then need to setup some automations. One that turns the helper off when the person leaves and one that turns the helper on when they arrive home. Repeat that for every person in the household.
By now we have a working solution that we can use in our automations. But i'm not quite happy just yet, I want to connect these input helpers as device trackers and add them to my persons in Home assistant.
You can create an automation in Home assistant that maps the input helpers state to device trackers by using the device trackers see service. That service will update or create a device tracker with the specified name. Here's my automation that create a device_tracker.homekit_*
for every member of the household.
- alias: Homekit to device tracker
description: ''
trigger:
- entity_id: input_boolean.eva_present
platform: state
- entity_id: input_boolean.jonas_present
platform: state
condition: []
action:
- data_template:
dev_id: homekit_{{ trigger.to_state.name }}
location_name: '{{ ''home'' if trigger.to_state.state == ''on'' else ''not_home''
}}'
service: device_tracker.see
mode: parallel
max: 10
You can now assign the new device tracker to the corresponding person in home assistant. First you have to make sure that you have triggered the input boolean once first to force the automation to create the new device trackers. You can toggle the inputs in the Home app on your iPhone/Mac instead of leaving your house for real.
Here's the final result on my lovelace dashboard: