Hello, I have a ZWave switch that I am trying to connect to MQTT to have it send On/Off Commands to Mosquitto and in return receive On/Off Commands from another platform via MQTT. I have it publishing via MQTT but am unclear if I have to make another automation to also receive commands back or can somehow combine the two?
The minimum requirement to publish something are topic and payload yet your automation specifies neither of them.
I suggest you consider implementing the solution in the following post. Someone had a similar requirement (two instances of Home Assistant; need to control a light on one instance from the other instance) I offered a solution that employed MQTT Statestream and an automation.
NOTE
If you wish to share many entities then you may be better off using this custom integration:
Thanks so much for the information, it helped out.
One other question that is probably not related to mqtt but when I turn off a zwave switch in homeassistant the switch toggles off, then back on in the interface. However, the light does turn off. When I hit off again, the switch stays off in the interface and of course the light does nothing since its already off. I tried adding the following to my configuration, but it did not seem to help to make the switch properly stay off the first time.
That behavior is typically associated with this: no feedback from the device.
Home Assistant transmitted an off command to the zwave light. It expected to receive a timely reply from the light that its status is now off. However it didn’t get the expected reply so it moved the switch (in the UI) back to the on position.
The challenge is to determine why the zwave light isn’t replying with its status.