Hello Everyone,
I would like to setup an automation that sends me an alert when one of my room thermostat is disconnected but with the name of the room, can you help me?
trigger:
- type: not_connected
platform: device
device_id: 47cb711
entity_id: binary_sensor.va0286_connection_state
domain: binary_sensor
for:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- type: not_connected
platform: device
device_id: a6b41d1e
entity_id: binary_sensor.va11445_connection_state
domain: binary_sensor
for:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
....
action:
- service: notify.mobile_app_...
data:
title: Vanne déconnectée {{ trigger.entity_id }}
message: VĂ©rifier les piles des vannes {{ trigger.entity_id }}
Iâm sure there is a solution about it
This works but the state âunavailableâ has a light delay to HA:
alias: 'Test: unavailable'
description: ''
trigger:
- platform: state
entity_id: sensor.YOURSENSOR
to: unavailable
for:
hours: 0
minutes: 0
seconds: 10
condition: []
action:
- service: notify.mobile_YOUR_PHONE
data:
message: YOUR_MESSAGE
mode: single
pedolsky
(Pedolsky)
May 2, 2022, 11:08am
3
Try out this:
action:
- service: notifyâŠ.
data:
title: >-
Vanne déconnectée {{ trigger.entity_id }} ({{
area_name(trigger.entity_id) }})
message: >-
VĂ©rifier les piles des vannes {{ trigger.entity_id }} ({{
area_name(trigger.entity_id) }})
Iâve used persistant notification service for testing purposes)
P.S.: KĂŒche = kitchen
3 Likes
Thatâs working perfectly, thank you very much.
Is there any webpage i can find these kind of function ? (area_name in this case) ?
pedolsky
(Pedolsky)
May 4, 2022, 7:31pm
5
Have fun
If you scroll down to âTopicsâ and then âAutomationâ, you will find a bunch more.
1 Like