Last active
June 20, 2022 14:33
-
-
Save user-x-adm/3bf85b5d6e72e3751424d23a2a9a4fe8 to your computer and use it in GitHub Desktop.
Home-Assistant-Blueprint-Batterie-Warnung
This file contains 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: Warnung-Batterielevel-zu-niedrig | |
description: 'Wenn einer der Batteriesensoren auslöst, wird eine Benachrichtigung erstellt. | |
Die Sensoren müssen nicht konfiguriert werden. Sie werden automatisch anhand der | |
Eigenschaft "Batterie" erkannt.' | |
domain: automation | |
input: | |
titel: | |
name: Meldungstitel | |
description: Titel für die Meldung beispielsweise !! WARNUNG !! | |
default: '!! WARNUNG !!' | |
selector: | |
text: | |
text: | |
name: Meldungstext | |
description: 'Text (Inhalt) der Meldung. Der eingegebene Text wird | |
an den Namen des Sensors, der ausgelöst hat, angehängt. | |
[Name des Sensors]+[Meldungstext]' | |
default: 'Batterie wechseln!' | |
selector: | |
text: | |
trigger: | |
- event_data: {} | |
event_type: state_changed | |
platform: event | |
condition: | |
- condition: template | |
value_template: '{{ trigger.event.data.new_state.attributes.device_class == "battery" }}' | |
- condition: template | |
value_template: '{{ trigger.event.data.new_state.state == "on" }}' | |
variables: | |
text_var: !input 'text' | |
action: | |
- service: notify.persistent_notification | |
data: | |
title: !input 'titel' | |
message: '{{ trigger.event.data.new_state.attributes.friendly_name }} {{ text_var }}' | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment