
Aqara Tür- und Fenstersensor, Erfordert Aqara Hub, Zigbee-Verbindung, Drahtloser Detektor für Alarmanlage und Smart Home, Kompatibel mit Apple HomeKit, Alexa, IFTTT
Unverb. Preisempf.: 16,99 €
13,59 €Sie sparen 3,40 € (20%)
Arek Swistak war so nett ein Beispiel für eine ESPHome Automatisierung mit uns zu teilen, die nur ausgeführt wird, wenn der hinterlegte MQTT-Broker nicht erreichbar ist.
Danke dafür!
binary_sensor:
- platform: gpio
pin:
number: GPIO5
name: "Schalter"
on_state:
if:
condition:
mqtt.connected:
then:
- logger.log: Mqtt is connected!
else:
- light.toggle: schalter_id
internal: true
output:
- platform: gpio
pin: GPIO4
id: lampe
mqtt:
broker: broker ip
username: "user"
password: "passwordmqtt"