/leak-detector-notifier.yaml Secret
-
-
Save TurtleFX/213bd28f5cfb1a7cded5eb2e91aa30b8 to your computer and use it in GitHub Desktop.
blueprint: | |
name: Leak detection & notification | |
description: Send a notification when any configured moisture sensor becomes moist | |
domain: automation | |
input: | |
actions: | |
name: Actions | |
description: Notifications or similar to be run. Use {{ trigger.event.data.new_state.attributes.friendly_name }} in a message for a friendly name of the sensor. | |
selector: | |
action: {} | |
trigger: | |
- event_data: {} | |
event_type: state_changed | |
platform: event | |
condition: | |
- condition: template | |
value_template: '{{ trigger.event.data.new_state.attributes.device_class == "moisture" }}' | |
- condition: template | |
value_template: '{{ trigger.event.data.new_state.state == "on" }}' | |
action: | |
- choose: [] | |
default: !input 'actions' | |
mode: single |
Thanks for the blueprint. Very useful. Can I suggest an exemption please. So I added 4 leak sensors. Kitchen, Bathroom, toilet and Aquarium. I have your blueprint initiating a water valve turn off cutting off mains water and notification which works perfectly.
The Aquarium leak sensor I added is non critical and need it exempt from it. I am trying to figure out how to manually edit the blueprint but not sure I am getting it since very new to Home assistant let alone YAML.
So if you are not keen on adding this, can I confirm which one would work?
condition:
-
condition: template
value_template: "{{ trigger.event.data.new_state.attributes.device_class == "moisture" }}" -
condition: template
value_template: "{{ trigger.event.data.new_state.state == "on" }}" -
condition: not
conditions:- type: is_moist
condition: device
device_id: XXXXXXXXXXXX
entity_id: YYYYYYYYYYYY
domain: binary_sensor
- type: is_moist
-
condition: and
conditions:- condition: not
conditions:- type: is_moist
condition: device
device_id: XXXXXXXXXXXX
entity_id: YYYYYYYYYYYY
domain: binary_sensor
- type: is_moist
- condition: not
Is there a way to modify this to tell you which sensor triggered it like the original blueprint?
Thanks!
Is there a way to modify this to tell you which sensor triggered it like the original blueprint?
Thanks!
@mukul-k, the solution is in the description.
Is there a way to modify this to tell you which sensor triggered it like the original blueprint?
Thanks!@mukul-k, the solution is in the description.
totally missed that! thanks!
Is there a way to modify this to tell you which sensor triggered it like the original blueprint?
Thanks!@mukul-k, the solution is in the description.
totally missed that! thanks!
You're welcome!
Modified version of the Leak detection & notifier blueprint.
Actions can be chosen freely, e.g. to call a service for email notification. Also, several actions can be added. Used Low battery level detection blueprint as example for this action.