I have this zone based automation to disarm the house alarm as we enter a zone, I have 3 home zones defined, home, home-medium, home-extended.
- id: '1724303698147'
alias: Disarm Alarm - Zone
description: ''
trigger:
- platform: zone
entity_id: person
zone: zone.home
event: enter
- platform: zone
entity_id: person
zone: zone.home
event: enter
- platform: state
entity_id:
- device_tracker.c3po
to: home
- platform: state
entity_id:
- device_tracker.r2_d2
to: home
- platform: device
device_id: 48562e1cf3edcd0e723c0b4ebd8f17ae
domain: device_tracker
entity_id: 7611459695261117840cf946380b0607
type: enters
zone: zone.home_medium
id: home_extended
- platform: device
device_id: 6973a6f6f1822b04887ea8dd8b131f08
domain: device_tracker
entity_id: 83e1ead38e20ca4407d44b37cf2b63cc
type: enters
zone: zone.home_medium
condition:
- condition: state
entity_id: zone.home
attribute: persons
state: '0'
- condition: state
entity_id: alarm_control_panel.alarm
state: armed_away
action:
- action: alarm_control_panel.alarm_disarm
metadata: {}
data:
code: '****'
target:
device_id: 983405354c0e85085d81f56eae591a00
- action: notify.all_mobile_notifications
metadata: {}
data:
title: House alarm
message: House disarmed
mode: single
This automation never triggers or anything, I ran it manually and it worked but when we enter the home-medium zone it doesn’t work but I have another automation that tells me when someone enters or leaves the zone and send a notification and that automation works perfectly, everytime I or someone enters/leaves a zone, I get a notification. so I know that homeassistant is getting zone updates, I’m just confused as to why this automation doesn’t work.
entity_id: person is definitely wrong. You need to define the actual person entities or put them in a group, in which case your entity will be group.something
Alternatively, zone also has a numeric state which is more flexible. Change all your triggers so that numeric state is greater than 0 and you won’t have to bother with maintaining persons in the automation.
Tip 1. Try to avoid using device triggers for your automations.
Tip 2. You haven’t provided the automation which you say works fine so we can compare, therefore all this is just a guess.
This is the zone based automation that works and sends me all the notifications for every zone thats exited and entered. I’ll switch it to entity based and see if that works