Hey,
So I have an automation that runs whenever one out of the people from my household enters the home.
It will then run a script that disables the alarm.
Now I’ve also added a notification to let met know when that happens.
However it looks like the event is triggered multiple times, even without the state of the alarm being set to off.
So how could I configure it to only notify me if the alarm state was set to on, before switching it off.
The alarm is switch.alarm and has state on and off.
alias: Het huis betreden
description: ''
trigger:
- platform: zone
entity_id: person.dennis_vermaut
zone: zone.home
event: enter
- platform: zone
entity_id: person.eve_artsy
zone: zone.home
event: enter
- platform: zone
entity_id: person.my_child
zone: zone.home
event: enter
condition: []
action:
- scene: scene.present_in_house
- service: notify.notify
data:
message: The alarm is now deactivated.
title: The alarm is now deactivated.
mode: queued
max: 10