Skip to content

Instantly share code, notes, and snippets.

@TurtleFX
Forked from bbbenji/leak-detector-notifier.yaml
Last active December 19, 2024 14:27
Show Gist options
  • Save TurtleFX/213bd28f5cfb1a7cded5eb2e91aa30b8 to your computer and use it in GitHub Desktop.
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
@mukul-k
Copy link

mukul-k commented Dec 1, 2024

Is there a way to modify this to tell you which sensor triggered it like the original blueprint?

Thanks!

@patienttruth
Copy link

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.

@mukul-k
Copy link

mukul-k commented Dec 19, 2024

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!

@patienttruth
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment