I am connecting my Nissan LEAF to Home Assistant through MQTT (OVMS v3). The climate controls work by sending console commands to a “command” topic and responses come from a “respose” topic. The complication is that the response is a multiline response. I got my yaml code from here, and I assume it works for the author, but I can’t get it to work. The YAML seems to match the string in MQTT. Are there any debug tools I can use to see what it is HA is seeing?
mqtt: switch: - name: Leaf Climate Conrol qos: 1 command_topic: "ovms/mqttuser/STICKY/client/home-assistant/command/1" state_topic: "ovms/mqttuser/STICKY/client/home-assistant/response/1" state_on: | Climate Control on state_off: | Climate Control off payload_on: "climatecontrol on" payload_off: "climatecontrol off"
ovms/mqttuser/STICKY/client/home-assistant/command/1 climatecontrol off ovms/mqttuser/STICKY/client/home-assistant/response/1 Climate Control off ovms/mqttuser/STICKY/event clock.2231
(I included the 'clock` event to show there are two carriage returns after the response)
I expect the switch state to be set to “Off” when the response topic is sent. Instead it always shows state “Unknown.”
What is wrong here?