This is part of my automation to keep an ESP device from going back to sleep when it wakes and instead turn on a pump. It should wait at the wait for trigger which is mqtt message with payload “ON” but it continues if there is any message in the solarplantwatering/birth field either ON/OFF/offline. The device is still asleep so automation finishes without pump ever switching on.The only thing to prevent it continuing on early is if I delete solarplantwatering/birth topic by mqttexplorer. Anybody got a clue?
alias: Water Plant Pump 2
sequence:
- service: mqtt.publish
data:
topic: solarplantwatering/ota_mode
payload: "ON"
qos: "1"
retain: true
- service: mqtt.publish
data:
topic: solarplantwatering/sleepearly
payload: "OFF"
qos: "1"
retain: true
- wait_for_trigger:
- platform: mqtt
topic: solarplantwatering/birth
payload: "ON"
continue_on_timeout: false
timeout:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
- delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
- service: switch.turn_on
data: {}
target:
entity_id: switch.plant_watering2