Katzenklo.yaml
· 5.1 KiB · YAML
Неформатований
# ============================================
# KATZENKLO ERINNERUNG BLUEPRINT
# ============================================
# Speichere diese Datei als: blueprints/automation/katzenklo_erinnerung.yaml
# oder importiere sie über die Home Assistant UI
blueprint:
name: Katzenklo Erinnerung
description: >
Sendet eine tägliche Erinnerung an zwei Handys.
Wenn eine Person die Aufgabe als erledigt markiert,
verschwindet die Benachrichtigung bei beiden.
domain: automation
input:
erinnerungszeit:
name: Erinnerungszeit
description: Wann soll die Erinnerung gesendet werden?
selector:
time: {}
default: "20:00:00"
nachricht:
name: Nachricht
description: Welche Nachricht soll gesendet werden?
selector:
text:
multiline: false
default: "🐱 Zeit, das Katzenklo zu reinigen!"
handy_person1:
name: Handy Person 1
description: Notify-Service für das erste Handy
selector:
select:
options:
- label: "Bitte auswählen..."
value: ""
handy_person2:
name: Handy Person 2
description: Notify-Service für das zweite Handy
selector:
select:
options:
- label: "Bitte auswählen..."
value: ""
spaeter_minuten:
name: Später-Funktion (Minuten)
description: Nach wie vielen Minuten soll bei "Später" erneut erinnert werden?
selector:
number:
min: 5
max: 120
step: 5
unit_of_measurement: "min"
default: 30
bestaetigung_senden:
name: Bestätigungsnachricht senden
description: Soll eine Bestätigung gesendet werden, wenn jemand "Erledigt" klickt?
selector:
boolean: {}
default: true
# Hauptautomation für die tägliche Erinnerung
trigger:
- platform: time
at: !input erinnerungszeit
action:
# Nachricht an Person 1
- service: !input handy_person1
data:
title: "Katzenklo"
message: !input nachricht
data:
tag: "katzenklo_reminder"
actions:
- action: "KATZENKLO_ERLEDIGT"
title: "✓ Erledigt"
- action: "KATZENKLO_SPAETER"
title: "⏰ Später"
# Nachricht an Person 2
- service: !input handy_person2
data:
title: "Katzenklo"
message: !input nachricht
data:
tag: "katzenklo_reminder"
actions:
- action: "KATZENKLO_ERLEDIGT"
title: "✓ Erledigt"
- action: "KATZENKLO_SPAETER"
title: "⏰ Später"
mode: single
---
# ============================================
# AUTOMATION: Erledigt-Aktion
# ============================================
# Diese Automation muss separat erstellt werden
- id: katzenklo_erledigt_handler
alias: "Katzenklo: Erledigt Handler"
description: "Entfernt die Benachrichtigung bei beiden"
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "KATZENKLO_ERLEDIGT"
action:
# Benachrichtigungen entfernen
- service: notify.mobile_app_handy_person1
data:
message: "clear_notification"
data:
tag: "katzenklo_reminder"
- service: notify.mobile_app_handy_person2
data:
message: "clear_notification"
data:
tag: "katzenklo_reminder"
# Optional: Bestätigungsnachricht (passe an deine Notify-Services an)
- service: notify.mobile_app_handy_person1
data:
message: "Katzenklo wurde gereinigt! 👍"
- service: notify.mobile_app_handy_person2
data:
message: "Katzenklo wurde gereinigt! 👍"
---
# ============================================
# AUTOMATION: Später-Aktion
# ============================================
- id: katzenklo_spaeter_handler
alias: "Katzenklo: Später Handler"
description: "Erinnert nach X Minuten erneut"
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "KATZENKLO_SPAETER"
action:
# Aktuelle Benachrichtigungen entfernen
- service: notify.mobile_app_handy_person1
data:
message: "clear_notification"
data:
tag: "katzenklo_reminder"
- service: notify.mobile_app_handy_person2
data:
message: "clear_notification"
data:
tag: "katzenklo_reminder"
# Warten (Zeit anpassen nach Bedarf)
- delay:
minutes: 30
# Erneut erinnern
- service: notify.mobile_app_handy_person1
data:
title: "Katzenklo - Erinnerung"
message: "🐱 Zeit, das Katzenklo zu reinigen!"
data:
tag: "katzenklo_reminder"
actions:
- action: "KATZENKLO_ERLEDIGT"
title: "✓ Erledigt"
- service: notify.mobile_app_handy_person2
data:
title: "Katzenklo - Erinnerung"
message: "🐱 Zeit, das Katzenklo zu reinigen!"
data:
tag: "katzenklo_reminder"
actions:
- action: "KATZENKLO_ERLEDIGT"
title: "✓ Erledigt"
| 1 | # ============================================ |
| 2 | # KATZENKLO ERINNERUNG BLUEPRINT |
| 3 | # ============================================ |
| 4 | # Speichere diese Datei als: blueprints/automation/katzenklo_erinnerung.yaml |
| 5 | # oder importiere sie über die Home Assistant UI |
| 6 | |
| 7 | blueprint: |
| 8 | name: Katzenklo Erinnerung |
| 9 | description: > |
| 10 | Sendet eine tägliche Erinnerung an zwei Handys. |
| 11 | Wenn eine Person die Aufgabe als erledigt markiert, |
| 12 | verschwindet die Benachrichtigung bei beiden. |
| 13 | domain: automation |
| 14 | input: |
| 15 | erinnerungszeit: |
| 16 | name: Erinnerungszeit |
| 17 | description: Wann soll die Erinnerung gesendet werden? |
| 18 | selector: |
| 19 | time: {} |
| 20 | default: "20:00:00" |
| 21 | |
| 22 | nachricht: |
| 23 | name: Nachricht |
| 24 | description: Welche Nachricht soll gesendet werden? |
| 25 | selector: |
| 26 | text: |
| 27 | multiline: false |
| 28 | default: "🐱 Zeit, das Katzenklo zu reinigen!" |
| 29 | |
| 30 | handy_person1: |
| 31 | name: Handy Person 1 |
| 32 | description: Notify-Service für das erste Handy |
| 33 | selector: |
| 34 | select: |
| 35 | options: |
| 36 | - label: "Bitte auswählen..." |
| 37 | value: "" |
| 38 | |
| 39 | handy_person2: |
| 40 | name: Handy Person 2 |
| 41 | description: Notify-Service für das zweite Handy |
| 42 | selector: |
| 43 | select: |
| 44 | options: |
| 45 | - label: "Bitte auswählen..." |
| 46 | value: "" |
| 47 | |
| 48 | spaeter_minuten: |
| 49 | name: Später-Funktion (Minuten) |
| 50 | description: Nach wie vielen Minuten soll bei "Später" erneut erinnert werden? |
| 51 | selector: |
| 52 | number: |
| 53 | min: 5 |
| 54 | max: 120 |
| 55 | step: 5 |
| 56 | unit_of_measurement: "min" |
| 57 | default: 30 |
| 58 | |
| 59 | bestaetigung_senden: |
| 60 | name: Bestätigungsnachricht senden |
| 61 | description: Soll eine Bestätigung gesendet werden, wenn jemand "Erledigt" klickt? |
| 62 | selector: |
| 63 | boolean: {} |
| 64 | default: true |
| 65 | |
| 66 | # Hauptautomation für die tägliche Erinnerung |
| 67 | trigger: |
| 68 | - platform: time |
| 69 | at: !input erinnerungszeit |
| 70 | |
| 71 | action: |
| 72 | # Nachricht an Person 1 |
| 73 | - service: !input handy_person1 |
| 74 | data: |
| 75 | title: "Katzenklo" |
| 76 | message: !input nachricht |
| 77 | data: |
| 78 | tag: "katzenklo_reminder" |
| 79 | actions: |
| 80 | - action: "KATZENKLO_ERLEDIGT" |
| 81 | title: "✓ Erledigt" |
| 82 | - action: "KATZENKLO_SPAETER" |
| 83 | title: "⏰ Später" |
| 84 | |
| 85 | # Nachricht an Person 2 |
| 86 | - service: !input handy_person2 |
| 87 | data: |
| 88 | title: "Katzenklo" |
| 89 | message: !input nachricht |
| 90 | data: |
| 91 | tag: "katzenklo_reminder" |
| 92 | actions: |
| 93 | - action: "KATZENKLO_ERLEDIGT" |
| 94 | title: "✓ Erledigt" |
| 95 | - action: "KATZENKLO_SPAETER" |
| 96 | title: "⏰ Später" |
| 97 | |
| 98 | mode: single |
| 99 | |
| 100 | --- |
| 101 | # ============================================ |
| 102 | # AUTOMATION: Erledigt-Aktion |
| 103 | # ============================================ |
| 104 | # Diese Automation muss separat erstellt werden |
| 105 | |
| 106 | - id: katzenklo_erledigt_handler |
| 107 | alias: "Katzenklo: Erledigt Handler" |
| 108 | description: "Entfernt die Benachrichtigung bei beiden" |
| 109 | trigger: |
| 110 | - platform: event |
| 111 | event_type: mobile_app_notification_action |
| 112 | event_data: |
| 113 | action: "KATZENKLO_ERLEDIGT" |
| 114 | action: |
| 115 | # Benachrichtigungen entfernen |
| 116 | - service: notify.mobile_app_handy_person1 |
| 117 | data: |
| 118 | message: "clear_notification" |
| 119 | data: |
| 120 | tag: "katzenklo_reminder" |
| 121 | |
| 122 | - service: notify.mobile_app_handy_person2 |
| 123 | data: |
| 124 | message: "clear_notification" |
| 125 | data: |
| 126 | tag: "katzenklo_reminder" |
| 127 | |
| 128 | # Optional: Bestätigungsnachricht (passe an deine Notify-Services an) |
| 129 | - service: notify.mobile_app_handy_person1 |
| 130 | data: |
| 131 | message: "Katzenklo wurde gereinigt! 👍" |
| 132 | |
| 133 | - service: notify.mobile_app_handy_person2 |
| 134 | data: |
| 135 | message: "Katzenklo wurde gereinigt! 👍" |
| 136 | |
| 137 | --- |
| 138 | # ============================================ |
| 139 | # AUTOMATION: Später-Aktion |
| 140 | # ============================================ |
| 141 | |
| 142 | - id: katzenklo_spaeter_handler |
| 143 | alias: "Katzenklo: Später Handler" |
| 144 | description: "Erinnert nach X Minuten erneut" |
| 145 | trigger: |
| 146 | - platform: event |
| 147 | event_type: mobile_app_notification_action |
| 148 | event_data: |
| 149 | action: "KATZENKLO_SPAETER" |
| 150 | action: |
| 151 | # Aktuelle Benachrichtigungen entfernen |
| 152 | - service: notify.mobile_app_handy_person1 |
| 153 | data: |
| 154 | message: "clear_notification" |
| 155 | data: |
| 156 | tag: "katzenklo_reminder" |
| 157 | |
| 158 | - service: notify.mobile_app_handy_person2 |
| 159 | data: |
| 160 | message: "clear_notification" |
| 161 | data: |
| 162 | tag: "katzenklo_reminder" |
| 163 | |
| 164 | # Warten (Zeit anpassen nach Bedarf) |
| 165 | - delay: |
| 166 | minutes: 30 |
| 167 | |
| 168 | # Erneut erinnern |
| 169 | - service: notify.mobile_app_handy_person1 |
| 170 | data: |
| 171 | title: "Katzenklo - Erinnerung" |
| 172 | message: "🐱 Zeit, das Katzenklo zu reinigen!" |
| 173 | data: |
| 174 | tag: "katzenklo_reminder" |
| 175 | actions: |
| 176 | - action: "KATZENKLO_ERLEDIGT" |
| 177 | title: "✓ Erledigt" |
| 178 | |
| 179 | - service: notify.mobile_app_handy_person2 |
| 180 | data: |
| 181 | title: "Katzenklo - Erinnerung" |
| 182 | message: "🐱 Zeit, das Katzenklo zu reinigen!" |
| 183 | data: |
| 184 | tag: "katzenklo_reminder" |
| 185 | actions: |
| 186 | - action: "KATZENKLO_ERLEDIGT" |
| 187 | title: "✓ Erledigt" |