Last active
November 28, 2022 19:54
-
-
Save user-x-adm/9c5e5580167e719049214998eef46b4a to your computer and use it in GitHub Desktop.
home assistant blueprint
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: Alarmanlage | |
description: > | |
Simple Einbruchmeldeanlage (EMA) mit stillem Alarm via Push-Nachricht aufs Handy. | |
De-/Aktivierung erfolgt über einen Schalter. Nachrichten werden im Alarmfall, bei | |
De-/Aktivierung und im Fehlerfall (wenn noch Türen/Fenster bei der Aktivierung offen stehen) | |
verschickt. | |
domain: automation | |
input: | |
alarm_state: | |
name: Alarm Ein/Aus | |
description: "(Um)Schalter zum Setzen des aktuellen Status der Alarmanlage. Das kann ein Helfer vom Typ Umschalter oder jeder andere Schalter sein" | |
selector: | |
entity: | |
sensor: | |
name: Sensoren | |
description: "Liste der Sensoren, die den Alarm auslösen sollen (Tür/Fenster)" | |
selector: | |
entity: | |
multiple: true | |
domain: binary_sensor | |
alarm_title: | |
name: Alarmmeldung | |
description: "Titel der Push-Nachricht für den Alarm beispielsweise !! ALARM !!" | |
default: "!! ALARM !!" | |
selector: | |
text: | |
alarm_text: | |
name: Alarmtext | |
description: "Text (Inhalt) der Push-Nachricht. Der eingegebene Text wird an den Namen des Sensors, der ausgelöst hat, angehängt. [Name des Sensors]+[Meldungstext]" | |
default: " wurde geöffnet!" | |
selector: | |
text: | |
info_title: | |
name: Information | |
description: "Titel der Push-Nachricht für nachfolgende Informationstexte" | |
default: "INFO" | |
selector: | |
text: | |
info_off: | |
name: Deaktiviert | |
description: "Text (Inhalt) der Push-Nachricht für die Deaktivierung der Alarmanlage" | |
default: "Alarm deaktiviert" | |
selector: | |
text: | |
info_on: | |
name: Aktiviert | |
description: "Text (Inhalt) der Push-Nachricht für die Aktivierung der Alarmanlage" | |
default: "Alarm aktiviert" | |
selector: | |
text: | |
error_title: | |
name: Aktivierungsfehler | |
description: "Titel der Push-Nachricht, wenn nicht alle Türen und Fenster geschlossen sind" | |
default: "Fehler!" | |
selector: | |
text: | |
error_text: | |
name: Fehlertext | |
description: "Text (Inhalt) der Push-Nachricht, wenn nicht alle Türen und Fenster geschlossen sind" | |
default: "bei der Aktivierung der Alarmanlage. Es stehen noch Türen oder Fenster offen!" | |
selector: | |
text: | |
trigger: | |
- platform: state | |
entity_id: !input sensor | |
to: "on" | |
id: "1" | |
- platform: state | |
entity_id: !input alarm_state | |
from: "on" | |
to: "off" | |
id: "2" | |
- platform: state | |
entity_id: !input alarm_state | |
from: "off" | |
to: "on" | |
id: "3" | |
condition: [] | |
variables: | |
text_var: !input alarm_text | |
action: | |
- choose: | |
- conditions: | |
- condition: trigger | |
id: "1" | |
- condition: state | |
entity_id: !input alarm_state | |
state: "on" | |
sequence: | |
- service: notify.notify | |
data: | |
title: !input alarm_title | |
message: "{{trigger.to_state.name}} {{text_var}}" | |
- service: notify.persistent_notification | |
data: | |
title: !input alarm_title | |
message: "{{trigger.to_state.name}} {{text_var}}" | |
- event: blueprint.user-x-adm | |
event_data: | |
status.message: alarm | |
message: "{{trigger.to_state.name}} {{text_var}}" | |
blueprint: ema | |
author: user-x-adm | |
- conditions: | |
- condition: trigger | |
id: "2" | |
sequence: | |
- service: notify.notify | |
data: | |
title: !input info_title | |
message: !input info_off | |
- event: blueprint.user-x-adm | |
event_data: | |
status.message: info_off | |
message: !input info_off | |
blueprint: ema | |
author: user-x-adm | |
- conditions: | |
- condition: trigger | |
id: "3" | |
- condition: state | |
entity_id: !input sensor | |
state: "off" | |
sequence: | |
- service: notify.notify | |
data: | |
title: !input info_title | |
message: !input info_on | |
- event: blueprint.user-x-adm | |
event_data: | |
status.message: info_on | |
message: !input info_on | |
blueprint: ema | |
author: user-x-adm | |
- conditions: | |
- condition: trigger | |
id: "3" | |
- condition: state | |
entity_id: !input sensor | |
match: any | |
state: "on" | |
sequence: | |
- service: notify.notify | |
data: | |
message: !input error_text | |
title: !input error_title | |
- event: blueprint.user-x-adm | |
event_data: | |
status.message: error | |
message: !input error_text | |
blueprint: ema | |
author: user-x-adm | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Voraussetzungen für die Nutzung: notify.notify ist als Dienst verfügbar und ihr nutzt die orginal HA App.