haussteuerung:todo
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| haussteuerung:todo [2025/10/28 07:36] – dominik | haussteuerung:todo [2025/10/28 07:45] (current) – dominik | ||
|---|---|---|---|
| Line 17: | Line 17: | ||
| </ | </ | ||
| - | |||
| - | |||
| - | ====== Briefkasten-Automatisierung in Home Assistant ====== | ||
| - | |||
| - | ===== Überblick ===== | ||
| - | Diese Automatisierung nutzt einen Aqara MCCGQ11LM Tür-/ | ||
| - | |||
| - | ===== Voraussetzungen ===== | ||
| - | * Home Assistant mit Zigbee2MQTT-Integration. | ||
| - | * Aqara-Sensor gepairt; Entity-ID: '' | ||
| - | * HA Companion App auf zwei Handys für Benachrichtigungen (Services: '' | ||
| - | * Custom Integration: | ||
| - | * Helpers erstellen (Configuration > Helpers): | ||
| - | * Input Datetime: '' | ||
| - | * Input Boolean: '' | ||
| - | * Input Boolean: '' | ||
| - | * Sensor für Dauer-Tracking (in '' | ||
| - | <code yaml> | ||
| - | sensor: | ||
| - | - platform: history_stats | ||
| - | name: Briefkasten offen Dauer | ||
| - | entity_id: binary_sensor.briefkasten_contact | ||
| - | state: ' | ||
| - | type: time | ||
| - | start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}' | ||
| - | end: '{{ now() }}' | ||
| - | </ | ||
| - | |||
| - | ===== Automatisierungen ===== | ||
| - | Alle in '' | ||
| - | |||
| - | ==== Haupt-Automatisierung: | ||
| - | Triggert bei kurzer Öffnung (z.B. Postbote), speichert Timestamp und Dauer. | ||
| - | <code yaml> | ||
| - | automation: | ||
| - | - id: briefkasten_benachrichtigung | ||
| - | alias: Briefkasten geöffnet - Smarte Benachrichtigungen | ||
| - | trigger: | ||
| - | - platform: state | ||
| - | entity_id: binary_sensor.briefkasten_contact | ||
| - | from: ' | ||
| - | to: ' | ||
| - | condition: | ||
| - | - condition: state | ||
| - | entity_id: input_boolean.briefkasten_snooze | ||
| - | state: ' | ||
| - | action: | ||
| - | - wait_for_trigger: | ||
| - | - platform: state | ||
| - | entity_id: binary_sensor.briefkasten_contact | ||
| - | from: ' | ||
| - | to: ' | ||
| - | timeout: | ||
| - | minutes: 5 | ||
| - | continue_on_timeout: | ||
| - | - variables: | ||
| - | open_duration: | ||
| - | - condition: numeric_state | ||
| - | entity_id: "{{ open_duration }}" | ||
| - | below: 30 # Sekunden; anpassen für kurze Öffnungen | ||
| - | - service: input_datetime.set_datetime | ||
| - | target: | ||
| - | entity_id: input_datetime.briefkasten_letztes_oeffnen | ||
| - | data: | ||
| - | datetime: "{{ now() }}" | ||
| - | - service: notify.mobile_app_dein_handy1 | ||
| - | data: | ||
| - | title: "Post ist da!" | ||
| - | message: " | ||
| - | - service: notify.mobile_app_dein_handy2 | ||
| - | data: | ||
| - | title: "Post ist da!" | ||
| - | message: " | ||
| - | - service: browser_mod.notification | ||
| - | data: | ||
| - | title: " | ||
| - | message: "Kurze Öffnung ({{ open_duration }} Sek) um {{ now().strftime(' | ||
| - | mode: single | ||
| - | </ | ||
| - | |||
| - | ==== Warnung bei langem Offenbleiben ==== | ||
| - | Für blockierte Post (Deckel geht nicht zu). | ||
| - | <code yaml> | ||
| - | automation: | ||
| - | - id: briefkasten_offen_warnung | ||
| - | alias: Briefkasten steht offen - Warnung | ||
| - | trigger: | ||
| - | - platform: state | ||
| - | entity_id: binary_sensor.briefkasten_contact | ||
| - | to: ' | ||
| - | for: | ||
| - | minutes: 5 | ||
| - | condition: | ||
| - | - condition: state | ||
| - | entity_id: input_boolean.briefkasten_offen_cooldown | ||
| - | state: ' | ||
| - | action: | ||
| - | - service: notify.mobile_app_dein_handy1 | ||
| - | data: | ||
| - | title: " | ||
| - | message: "Der Briefkasten ist seit {{ (now() - states.binary_sensor.briefkasten_contact.last_changed).total_seconds() | int // 60 }} Minuten offen. Vielleicht blockiert Post? (Stand: {{ now().strftime(' | ||
| - | - service: notify.mobile_app_dein_handy2 | ||
| - | data: | ||
| - | title: " | ||
| - | message: "Der Briefkasten ist seit {{ (now() - states.binary_sensor.briefkasten_contact.last_changed).total_seconds() | int // 60 }} Minuten offen. Vielleicht blockiert Post? (Stand: {{ now().strftime(' | ||
| - | - service: browser_mod.notification | ||
| - | data: | ||
| - | title: " | ||
| - | message: "Offen seit {{ (now() - states.binary_sensor.briefkasten_contact.last_changed).total_seconds() | int // 60 }} Min. – Überprüfen?" | ||
| - | duration: 60 | ||
| - | - service: input_boolean.turn_on | ||
| - | target: | ||
| - | entity_id: input_boolean.briefkasten_offen_cooldown | ||
| - | mode: restart | ||
| - | </ | ||
| - | |||
| - | ==== Snooze-Reset ==== | ||
| - | Auto-Reset für Snooze nach 10 Min. | ||
| - | <code yaml> | ||
| - | automation: | ||
| - | - id: briefkasten_snooze_reset | ||
| - | alias: Briefkasten Snooze zurücksetzen | ||
| - | trigger: | ||
| - | - platform: state | ||
| - | entity_id: input_boolean.briefkasten_snooze | ||
| - | to: ' | ||
| - | for: | ||
| - | minutes: 10 | ||
| - | action: | ||
| - | - service: input_boolean.turn_off | ||
| - | target: | ||
| - | entity_id: input_boolean.briefkasten_snooze | ||
| - | </ | ||
| - | |||
| - | ==== Cooldown-Reset für Offen-Warnung ==== | ||
| - | Throttling: Reset nach 1 Stunde. | ||
| - | <code yaml> | ||
| - | automation: | ||
| - | - id: briefkasten_offen_cooldown_reset | ||
| - | alias: Offen-Warnung Cooldown zurücksetzen | ||
| - | trigger: | ||
| - | - platform: state | ||
| - | entity_id: input_boolean.briefkasten_offen_cooldown | ||
| - | to: ' | ||
| - | for: | ||
| - | hours: 1 | ||
| - | action: | ||
| - | - service: input_boolean.turn_off | ||
| - | target: | ||
| - | entity_id: input_boolean.briefkasten_offen_cooldown | ||
| - | </ | ||
| - | |||
| - | ===== Dashboard-Integration ===== | ||
| - | * Entities Card für Sensor-Status. | ||
| - | * Markdown Card für Timestamp: '' | ||
| - | * Gauge Card für Dauer: '' | ||
| - | * Button für Snooze: Toggle '' | ||
| - | * Conditional Card für Warnung: '' | ||
| - | |||
| - | ===== Tipps und Anpassungen ===== | ||
| - | * Teste mit Developer Tools > States/ | ||
| - | * Passe Dauern (z.B. 30 Sek, 5 Min) an dein Verhalten an. | ||
| - | * Optional: Zeitbedingungen hinzufügen (z.B. nur 8-14 Uhr). | ||
| - | * Erweiterbar mit Kamera oder Vibration-Sensor für bessere Genauigkeit. | ||
| - | |||
| - | Diese Setup minimiert Fehlalarme und trackt alles Elegante. | ||
haussteuerung/todo.txt · Last modified: by dominik
