I finally got my water sensors working. I’m trying to create a single automation to handle everything.
How can I edit my yaml to send the location of the water sensor with the push alert as the mesage? i.e., is there a way to assign an id to the device and use that id as the message for the send notification?
Here is my automation config. I’m new to this, so definitely a learning curve. Thanks for any help you can provide.
alias: Water Sensor - Water Leak Detected
description: ''
trigger:
- type: moist
platform: device
device_id: 305a586d9f7660dfac8e421888e6cda0
entity_id: binary_sensor.water_sensor_erics_office_bathroom_ias_zone
domain: binary_sensor
id: Eric's Office Bathroom
- type: moist
platform: device
device_id: f48d914ab2ed693ceaa93bcfe50a6526
entity_id: binary_sensor.water_sensor_laundry_room_ias_zone
domain: binary_sensor
id: Laundry Room
- type: moist
platform: device
device_id: 90d88c26231a882710d48f484da4c773
entity_id: binary_sensor.water_sensor_lucas_bathroom_toilet_ias_zone
domain: binary_sensor
id: Luca's Bathroom Toilet
- type: moist
platform: device
device_id: 57cd079b8647ba2cf39a3b8b21f03c49
entity_id: binary_sensor.water_sensor_powder_room_ias_zone
domain: binary_sensor
id: Powder Room
- type: moist
platform: device
device_id: 5881155ba2f78eba845e6483ef094e85
entity_id: binary_sensor.water_sensor_water_heaters_ias_zone
domain: binary_sensor
id: Water Heaters
condition: []
action:
- service: notify.notify
data:
message: {{ trigger.id }}
title: Water Leak Detected
data:
push:
sound:
name: default
critical: 1
volume: 1
mode: single