How to integrate Shelly TRV as a MQTT HVAC device?

I made some progress integrating a Shelly TRV as a MQTT HVAC device with this settings:

mqtt:
  climate:
    name: MQTT-TRV Wohnen-01
    unique_id: "mqtt_trv_wohnen_01"
    min_temp: 4
    max_temp: 31
    temp_step: 0.5
    precision: 0.1
    qos: 1
    modes:
      - "off"
      - "heat"
    temperature_command_topic: "shellies/shellytrv-60A423D925E8/thermostat/0/command/target_t"
    current_temperature_topic: "shellies/shellytrv-60A423D925E8/info"
    current_temperature_template: "{{ value_json.thermostats[0].tmp.value }}"

This is the result:

On the left side is the integration via COIOT on the right side my MQTT device. What is marked with the yellow boxes is

  1. The working mode off the TRV just shows the state of the two mode buttons below
  2. Mode buttons for heat and off but they don’t have any functionality.

How could I activate the buttons and show the working state like in the COIOT integration? What I know is, setting shellies/shellytrv-60A423D925E8/thermostat/0/command/target_t to 4 turns off the device. And pushing the heat button should restore the old value for target_t.

The answer is simple, but also very unfortunate: You can not do that.
There is no specific MQTT topic or parameter in the TRV to turn the device on or off. It is done my setting target_t, but that way is not compatible with how HomeAssistant emulates the action buttons for clima devices. To make those working, an extra MQTT topic, or a dedicated parameter is needed.

What I would like to know is why you prefer the topic info over the topic status, to get the actual temperature.

1 Like