Hi there,
Im new to HA and automations. But so far im loving it.
However im trying to make an automation for the door/alarm based on pressence and motion. My mobile location isnt accurate so just using a zone isnt cutting it for me.
So im trying to do the next thing: When my phone enters the zone > Then do: when phone in home AND the front door detects motion DO actions: open door and disarm alarm. I got an example below me. Im not familiar with yaml nor scripting. But does this makes sense? Or what am im doing wrong here? Il drop the yaml below as well. Thanks in advance for any help!
alias: Nuki Sandra Automation
description: ""
triggers:
- device_id: a51a87bd9c6ee9d10078c254d6686d67
domain: device_tracker
entity_id: 091acc504aa41469e351e01a49c24830
type: enters
trigger: device
zone: zone.home
- device_id: 590f62cdde56edfd1fbf8ea50a1a9070
domain: device_tracker
entity_id: 62763f05f4242309dc09a35e7451f1fc
type: enters
trigger: device
zone: zone.home
conditions: []
actions:
- choose:
- conditions:
- condition: or
conditions:
- condition: device
device_id: a51a87bd9c6ee9d10078c254d6686d67
domain: device_tracker
entity_id: 091acc504aa41469e351e01a49c24830
type: is_home
- condition: device
device_id: 590f62cdde56edfd1fbf8ea50a1a9070
domain: device_tracker
entity_id: 62763f05f4242309dc09a35e7451f1fc
type: is_home
- condition: and
conditions:
- type: is_motion
condition: device
device_id: 550f43bb2a6008f9987a2546a3205e0d
entity_id: ac25a9a0d68e62628d67b4a2005acb5a
domain: binary_sensor
sequence:
- device_id: db03755a10ee15787f18897ac109c827
domain: lock
entity_id: fca0d02e5d30d6d690aba9da435c2cf5
type: open
- action: alarm_control_panel.alarm_disarm
metadata: {}
data:
code: "xxxx"
target:
device_id: c594d9dd58faa1fc51bc63a1fe7ba414
entity_id: alarm_control_panel.eindhoven_alarm
mode: single