ha-presence
People, zones, trackers, groups — the inputs for presence automations.
Prerequisites: ../ha-shared/SKILL.md,
../ha-services/SKILL.md.
Who is home
# person.* state is "home", "not_home", or a zone name
hass-cli state list -o json | rg '"entity_id": "person\.'
hass-cli state get person.alice -o json # attributes: source, latitude, longitude
Zones
hass-cli state list -o json | rg '"entity_id": "zone\.' # zone.home etc.
# Create/manage zone helpers like any helper config via the zone integration UI;
# zone.home is built from the instance's configured location (see `config get`).
Device trackers
hass-cli state get device_tracker.alice_phone -o json
# Manually set a tracker's location/state (REST state machine write):
hass-cli state set device_tracker.test --state home
hass-cli service call device_tracker.see --data '{"dev_id":"test","location_name":"home"}'
Groups (group.*)
hass-cli state get group.family -o json # attributes.entity_id lists members
Presence automation tips
- Trigger on
person.*ordevice_tracker.*state changes (to: home/to: not_home), or on zone enter/leave. - Combine with an
input_boolean"guest mode" helper (see ha-helpers) as a condition. - Verify by watching:
hass-cli event watch state_changedwhile moving a tracker, or inspect history viahass-cli system history --entities person.alice.