-
-
Save justintime/b6f97526963276ef52da247d9f7c10fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Leak detection & notifier | |
description: Send a notification when any configured moisture sensor becomes moist | |
domain: automation | |
input: | |
notify_device: | |
name: Notify device | |
description: "The device where the notification should be sent to." | |
selector: | |
device: | |
integration: mobile_app | |
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: | |
domain: mobile_app | |
type: notify | |
device_id: !input notify_device | |
title: "Leak detected!" | |
message: "{{ trigger.event.data.new_state.attributes.friendly_name }} has detected a leak." | |
data: | |
push: | |
sound: | |
name: default | |
critical: 1 | |
volume: 1 | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the same as the version it's forked from, except that the notification it sends is sent as a critical notification