Hi
I’m a noobie (and first posting) and am just trying to get an automation to work where by an inbound MQTT event causes a sonoff to turn on via a MQTT published topic as per below:
While the automation works, the issue is that the payload sent to the sonoff is always ‘OFF’, I’m very sure the payload with the inbound topic is just ‘ON’ (in capitals). (I don’t wish to set the outbound payload to inbound payload as eventually I will add more logic later).
Maybe I’m doing it all wrong so any advice very welcomed.
Sorry if formatting not right - I’ve pressed the </> button but nothing seemed to happen.
You need to format your code properly, use the blue link at the top of the post. Edit your original post. Do not copy from your original post and paste into a new post. The original formatting from your yaml will be lost if you do.
How are you confirming the automation is publishing to cmnd/sonoff01/power? Are you using MQTT.fx or some other MQTT client to monitor the topic and its payload?
BTW, I have no experience with Tasmota but according to Tasmota’s Wiki, payload is on or off. I don’t know if its case-sensitive because you’re sending ON and OFF.
Thanks @123 you made me really really check the topics were working (I’m using MQTT lens) and the issue was simply I was setting the payload to ‘ON’ and it should have been ON (no quotes). Doh!