Lovelace: Simple thermostat card

It is possible to use the modes option to trigger the preset_modes? My thermostat only has one hvac_modes, so the buttons are not all that useful.

Modes buttons not showing. Using v0.25.0 (via HACS) with HA 100.1.
Modes do show up fine with the stock lovelace card.
Code below:

- type: 'custom:simple-thermostat' 
  entity: climate.living_room_ac
  step_size: 1
  decimals: 0
  icon:
    heat: 'mdi:weather-sunny'
    cool: 'mdi:snowflake'
    'off': 'mdi:power'
  sensors:
     - entity: sensor.east_wing_temperature
  modes:
    'cool':
      include: true
      name: Cool
      icon: mdi:snowflake
    'heat':
      include: true
      name: Heat
      icon: mdi:fire
    'off':
      include: true
      name: 'Off'
      icon: mdi:power

I also have no modes buttons with HA 100.1 and simple-thermostat v0.25.0 or v0.26.0. How can i fix that? I’m using the Spirit Z - Wave Plus from eurotronic.

- type: 'custom:simple-thermostat' 
  entity: climate.eurotronic_thermostat_buero_heat
  name: 'Büro'
  step_size: 1
  decimals: 0
  sensors:
    - entity: sensor.thermostat_buero_modus
      name: 'Modus'
    - entity: sensor.eurotronic_thermostat_buero_battery_level
      name: 'Akku'
  modes:
    some_mode: false
    Manufacturer Specific:
      include: false
    boost:
      include: false
    Heat Eco:
      include: true
      name: Eco
      icon: mdi:leaf
    none:
      include: true
      name: Normal
      icon: mdi:fire
    'off':
      include: true
      name: Aus
      icon: mdi:power

Spirit Z - Wave Plus attributes:

hvac_modes: heat,off
current_temperature: 22.8
min_temp: 7
max_temp: 35
temperature: 23
preset_mode: none
preset_modes: Manufacturer Specific,Heat Eco,boost,none
node_id: 2
value_index: 1
value_instance: 1
value_id: 72057594076774418
friendly_name: Thermostat Büro normal
supported_features: 17

Same here, can’t get it to work again with v0.26.

After restarting HA several times, I now have the modes.

thermostat
But only the modes of hvac_modes. The modes from preset_modes are missing. In an earlier version of simple-thermostat, the modes of preset_modes were also available. Is it also possible to include the additional modes of preset_modes from the Spirit Z - Wave Plus attributes? How can I do that now?

hvac_modes: heat,off
preset_mode: none
preset_modes: Manufacturer Specific,Heat Eco,boost,none

You cannot right now.

Before HA 0.96 the present modes were together with the hvac modes in one field. Since 096 this behavior was changed and now only hvac_modes are supported for climate component.

So I guess without a bigger rework of the card it will not be possible to handle preset modes.

Thanks for all the continuous feedback here good folks. I finally found some time to publish a real 0.26 that has breaking changes to better support the climate domain revamp in 0.96. Unfortunately you will need to update your configs as modes is gone and replaced with a better control field that allow you to show as many as you want out of hvac, fan, preset and swing modes.

I’m sure there are bugs for certain devices and this also will not work if you have older HA versions. Please report real bugs on Github if you are able to do so.

1 Like

After upgrading to 0.27 i cannot anymore get the card working… I tried to change the configuration following the latest docs, but unfortunately cannot understand well how to change it.

My configuration card is:

                  type: custom:simple-thermostat
                  style:
                    --st-font-size-xl: 24px
                    --st-font-size-m: 20px
                    --st-font-size-title: 20px
                    --st-font-size-sensors: 30px
                    --st-spacing: 2px
                  entity: climate.living_room
                  sensors:
                    - entity: sensor.living_room_heating
                    - entity: sensor.living_room_humidity
                    - entity: sensor.living_room_power
                    - entity: sensor.living_room_temperature
                    - entity: sensor.temperature_158d0001b95f60
                  name: Tado
                  icon: mdi:thermostat
                  control:
                    hvac:
                      - 'Off': true
                      - heat: true                      
                      - auto: true
                    preset:
                      - Manual: false
                      - Timer: false
                      - Tado Mode: true
                        name: MAN
                      - Smart Schedule: true
                        name: AUTO

and the attributes of the sensor are:

16

Can someone correct my config to have the card working as was in the previous release?

hi, need some help with the config…

i’m trying to achieve the following from the example above, i tried a few options without success, back to the original code below :

          - type: horizontal-stack
            cards:
              - type: custom:simple-thermostat
                entity: climate.mzgn_slvn
                style: |
                  ha-card {
                    background: #fff5bc;
                    border-radius: 15px;
                    --primary-text-color: black;
                    --secondary-text-color: black;
                    --paper-item-icon-color: black;
                  } 

                name: AC Living Room
                step_size: 1
                sensors:
                  - entity: sensor.fibaro_system_fgwpef_wall_plug_gen5_power
                    name: Energy today
                  - attribute: min_temp
                    name: Min temp
                hide:
                  mode: false

This is the result :

i would like to add the buttons: cold and heat as in the example below

Anyone can help with the code?

Finally i got the card working, but with NO hvac and NO preset visible.

                  type: custom:simple-thermostat
                  style: |
                      ha-card {
                      font-size: 14px;
                      font-family: 'Times New Roman';
                      font-weight: bold;
                      }
                  entity: climate.living_room
                  sensors:
                    - entity: sensor.living_room_heating
                    - entity: sensor.living_room_humidity
                      name: Umidità Salotto
                    - entity: sensor.living_room_power
                    - entity: sensor.living_room_temperature
                      name: Temperatura Salotto
                    - entity: sensor.temperature_158d0001b95f60
                  name: Termostato Salotto
                  icon: mdi:thermostat
                  control:
                    hvac:
                      'Off': true
                      icon: fas:power-off
                      heat: true
                      name: true                     
                      auto: true
                      name: true
                    preset:
                      away: true
                    none:

This is the result:

41

How to get also preset and hvac modes visible?

Your config should probably be something like:

                  control:
                    hvac:
                      'off':
                        icon: fas:power-off
                    preset:
                      home: false

Your indenting and naming did seem very off. First off, you don’t really need to set true on modes as they will be included by default. Only hiding is needed. Second you need to set icon/name “under” the mode, you had them on the same level. So the simplified control config here seems like what you intended as far as I can guess. You also shouldn’t set name: true ever, that is for overriding the shown name of the mode, setting it to true doesn’t really make much sense and it would just mean that the normal name would be shown.

How does the state attributes for the climate entity look?
By default that config should give you hvac mode + preset mode control if they exist on the entity. Are you absolutely sure you have the latest version and no browser cache? (Browser cache is something like 90% likely to be the cause based on all problems everyone have had with new versions)

If i indent the name and the icons as you wrote i get this error in yaml:

mapping values are not allowed here in "/home/homeassistant/.homeassistant/ui-lovelace.yaml", line 2360, column 29

And that line is just for the name: Off

                    hvac:
                      'Off': 
                        name: Off
                        icon: fas:power-off
                      heat: 
                        name: On
                        icon: mdi:power                      
                      auto: 
                        name: AUTO
                        icon: mdi:auto-fix
                    preset:
                      home: false

EDIT my fault, cut true after ‘Off’ and the error is gone, but still no modes visibel in the card

Did you double-triple verify that you are actually getting the latest version of the card? I’m betting that is the culprit.

I got the upgrade through HACS so i think it’s the latest.

32

This is what i have inside the folder.

You probably did, but you need to verify in an incognito window and with clearing browser cache for the site. Refreshing is not enough

After updating the card and restarting HA, the modes and hvac are now displayed. But changes for name or icon are ignored.

- type: 'custom:simple-thermostat' 
  entity: climate.eurotronic_thermostat_buero_heat
  name: 'Büro'
  step_size: 1
  decimals: 0
  sensors:
    - entity: sensor.thermostat_buero_modus
      name: 'Modus'
    - entity: sensor.eurotronic_thermostat_buero_battery_level
      name: 'Akku'
  control:
    preset:
      'Manufacturer Specific': false
      boost: false
      none: true
      'Heat Eco': true
    hvac:
      heat:
        name: 'An'
        icon: mdi:fire
      'off':
        name: 'Aus'
        icon: mdi:power

thermostat

I noticed the latest release is with a different size compared to the one got with HACS. I downloaded this, refreshed cache and now i have all visible! It seems HACS did not downloaded the real latest.

I noticed the same, reported it on GitHub:

Icon/name override should be fixed now. I had added a last minute untested change before releasing 0.26 – the recipe for what you should never do :smiley: No change is small enough to be safe

1 Like