I am a bit of starting to “play” with HA automations
for that I have started with a door sensor and trying to send notifications to 2 devices
thisnis how ffar I have got. and works great!!!
alias: Puerta abierta +30
description: La puerta lleva abierta + de 30m tras la puesta del sol.
trigger:
- type: opened
platform: device
device_id: bf74e3e1c26adc5b2a1b1ba859b9a16a
entity_id: ec50a80aa65e529895564bed3aad72d3
domain: binary_sensor
for:
hours: 0
minutes: 5
seconds: 0
condition:
- condition: and
conditions:
- condition: sun
before: sunrise
- condition: sun
after: sunset
action:
- parallel:
- service: notify.mobile_app_mipad
metadata: {}
data:
message: Puerta exterior abierta durante +5min. Por favor compruebe!
title: ALERTA!
data:
subject: deberías comprobarlo
- service: notify.mobile_app_mi14
metadata: {}
data:
message: Puerta exterior abierta durante +5min. Por favor compruebe!
title: ALERTA!
data:
subject: deberías comprobarlo
color: "#00ac1d"
message: >
Este es un mensaje <span style="color:
#FF0004">importante </span><span style="color: #000000">La
puerta exterior ha estado abierta durante demasiado tiempo para
ser de noche</span>Por favor compruébelo
- service: notify.mobile_app_iphone_de_pilar
data:
data:
subtitle: deberías comprobarlo
title: ALERTA!
message: Puerta exterior abierta durante +5min. Por favor compruebe!
mode: restart
what I see is that when the first message is sent, the automation stops looking for the door, if its opened or not, so I won´t receive further messeges after the firts one.
is it possibble, sure it is jeje, to tell the automation to keep cheeking the door state, even better, to tell what time after the first message to start looking again?
and how to, for example
send the first with green icon, the second alert make it yellow and a third with red icon?
let´s see what we can do
thank you in advance