I am trying to improve the following yaml code (I did not write it) for a mqtt climate sensor with the following:
- buttons do not display in the card at all; they display in the setting page as a dropdown menu only
- I would like to add a third button (suspend) and I managed to do it but there is no icon and clicking on it does nothing, suspend should send an mqtt message
- My sensor has an hysteresis temperature above and below the desired temperature but I am not sure how to display it. I assume I need to setup
target_temperature_low
andtarget_temperature_high
in theTARGET_TEMPERATURE_RANGE
as described by climate entity doc
I know this is a lot of question but if you could at least give me clues because the doc is very unclear to me
mqtt:
climate:
- name: Climate Controller
action_topic: "AFB/sts/RunState"
action_template: >
{% if value in ("0", "1", "6", "7", "8") %}
off
{% elif value in ("10", "12") %}
idle
{% else %}
heating
{% endif %}
current_temperature_topic: "AFB/sts/TempCurrent"
max_temp: 35
min_temp: 8
modes:
- "off"
- "heat"
- "suspend"
mode_state_topic: "AFB/sts/Run"
mode_state_template: >
{% if value == "1" %}
heat
{% else if value == "10"%}
suspend
{% else %}
off
{% endif %}
mode_command_topic: "AFB/cmd/Run"
mode_command_template: >
{% if value == "heat" %}
1
{% else if value == "suspend"%}
10
{% else %}
0
{% endif %}
precision: 0.1
temperature_command_topic: "AFB/cmd/TempDesired"
temperature_state_topic: "AFB/sts/TempDesired"
temp_step: 0.5
retain: false