I have an Raspberry pi running Hassio and MQTT on the Pi
I did Build an arduino to publish data to Hassio that is working fine, but for some reason i cannot publish a payload on and off to the arduino i did try the local mqtt publish service on the Developer tab and that works fine but the normal toggle switch that i have made is not working at all i also have mqtt lens running and i cant see the msg coming into the mqtt broker so i know the problem is not the arduino, is the way i send the toggle on and off not correct?
i created the lovelace card that works but a soon as i slide the toggle i dont get the msg âpayloadâ in mqtt lens nor the arduino gets it any ideas?â
as soon as i toggel it should send zone1triggeron and zone1triggeroff when i toggle back.
I have Sensor config in my configuration.yaml file that connects to the broker and that is also reading data like it should
i dont know if it has something todo with the one mqtt publish button that i created it works in my script.yaml file it triggers a payload and then triggers it back but that is a custom script button that i created to do that for a flip on flip off instant switch that i tested and that also works
I restarted Home Assistant and âTest Switchâ appeared in the Lovelace UI. I turned the switch on then off.
Using MQTT Explorer, I confirmed it published zone1on and zone1off to the topic zone1.
So the MQTT Switch configuration is functional.
Thatâs why I asked you to test if Home Assistant was connected to the MQTT Broker. You reported it is connected, yet your MQTT Switch fails to publish to its topic.
The results donât add up:
You can publish from Home Assistantâs MQTT page.
The MQTT Switchâs configuration is functional.
The MQTT Switch fails to publish to its command_topic.