Need help with value_template for MQTT HVAC

Yes, since version 0.92. custom components require a manifest file which I have not yet created because I’m still using 0.89 on my production server and 0.91 on my test server.

I won’t be upgrading until 0.94 or 0.95 so I won’t be creating and sharing a manifest file for several more weeks. Until then, you can create your own by following the instructions here:

just did it, it works, thanks for the quick answer!

Hi ,
i try to use your custom climate but i want that i have a power button to turn off my A/C like your post image …

- platform: my_mqtt
  name: Tohar A/C
  modes:
     - cool
     - heat
     - off
  fan_modes:
     - auto
     - high
     - medium
    - low
  power_command_topic: "hvac/tohar/power/set"
  mode_command_topic: "hvac/tohar/mode/set"
  temperature_command_topic: "hvac/tohar/temperature/set"
  fan_mode_command_topic: "hvac/tohar/fan/set"
  current_temperature_topic: "hvac/tohar/state/temperature"
  payload_on: "on"
  payload_off: "off"
  retain: true
  initial: 22
  min_temp: 18
  max_temp: 30
  temp_step: 2

thanks…

Do you mean this image?

The top right is the standard Lovelace Thermostat card and the top left is a custom Lovelace card called Simple Thermostat. They work with any climate component and not just my custom climate component.

yes… iwant the power button also

Change this:

  modes:
     - cool
     - heat
     - off
  fan_modes:
     - auto
     - high
     - medium
    - low

to this:

  modes:
     - cool
     - heat
     - 'off'
  fan_modes:
     - auto
     - high
     - medium
     - low

Is there a way to change the else value to a variable instead of a constant?
I’ve tried this but can’t find the correct syntax
{% set values = { ‘0’:‘auto’, ‘1’:‘heat’, ‘2’:‘cool’, ‘4’:‘off’} %}
{{ values[value] if value in values.keys() else {{ states(“sensor.water_kitchen”) }} }}

This works but the 1 line is so much more concise
{% if value in values.key %}
{{ values.item }}
{% else %}
{{ states(“sensor.water_kitchen”) }}
{% endif %}

{{ values[value] if value in values.keys() else states('sensor.water_kitchen') }}

thank you so much, i could have sworn I tried that, lol

@123 did you eventually update your component? (No pressure, just asking! :slightly_smiling_face:)

Yes, it’s posted in a separate thread:

Be advised that it will work with Home Assistant version 0.93 to 0.95 but not 0.96.

great thanks!

@Imperial-Guard if your configuration is now done, can you share it? I have also the Eurotronic spirit thermostat with zigbee2mqtt.

1 Like