kevin ha revisionato questo gist . Vai alla revisione
1 file changed, 187 insertions
Katzenklo.yaml(file creato)
| @@ -0,0 +1,187 @@ | |||
| 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" | |
Più nuovi
Più vecchi