49 lines
1.3 KiB
Markdown
49 lines
1.3 KiB
Markdown
# 🏠 Home Assistant Integration
|
|
|
|
## MQTT-Integration aktivieren
|
|
- Einstellungen → Geräte & Dienste → Integration hinzufügen → MQTT
|
|
- Falls Home Assistant keinen eigenen Broker nutzt, installiere den **Mosquitto-Add-on**.
|
|
|
|
## Entitäten definieren
|
|
In `configuration.yaml`:
|
|
```yaml
|
|
binary_sensor:
|
|
- name: "Feuchte Alarm"
|
|
state_topic: "home/feuchte/alarm"
|
|
payload_on: "1"
|
|
payload_off: "0"
|
|
device_class: moisture
|
|
|
|
sensor:
|
|
- name: "Feuchte Sensor 1"
|
|
state_topic: "home/feuchte/sensor1"
|
|
unit_of_measurement: "%"
|
|
- name: "Feuchte Sensor 2"
|
|
state_topic: "home/feuchte/sensor2"
|
|
unit_of_measurement: "%"
|
|
- name: "Feuchte Sensor 3"
|
|
state_topic: "home/feuchte/sensor3"
|
|
unit_of_measurement: "%"
|
|
- name: "Feuchte Sensor 4"
|
|
state_topic: "home/feuchte/sensor4"
|
|
unit_of_measurement: "%"
|
|
```
|
|
|
|
## Anzeige im Dashboard
|
|
1. Übersicht → Bearbeiten → Karte hinzufügen → Entität.
|
|
2. Suche nach `feuchte` → Sensoren oder Alarm auswählen.
|
|
|
|
## Beispiel-Automation
|
|
```yaml
|
|
automation:
|
|
- alias: "Feuchtealarm"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.feuchte_alarm
|
|
to: "on"
|
|
action:
|
|
- service: notify.mobile_app_iphone
|
|
data:
|
|
message: "🚨 Feuchte erkannt im Gartenbereich!"
|
|
```
|