nervetattoo/simple-thermostat

Preset mode names changes in 2023.1 show up as undefined names for presets in card

wigster opened this issue · 18 comments

Describe the bug
After upgrade to 2023.1 the card does not have a label for preset modes, but rather prints them as ui.card.climate.preset_mode

To Reproduce
See config below

Expected behavior
I guess this should just be called 'preset'.

type: custom:simple-thermostat
entity: climate.trv_kids

Screenshots

image

Browser

  • OS: Win
  • Browser: Chrome
  • Simple Thermostat version from browser console: 2.5.0
  • Home Assistant version: 2023.1

This was caused by this Home Assistant frontend commit: home-assistant/frontend@0e70b86
Here's the line that got removed: home-assistant/frontend@0e70b86#diff-e67939fd25c650222db710f18764d10ae69454b0e8ad680f5e10177c2db93ceaL155

Same issue

Same issue running 2023.01.04 HA.

Same issue Home Assistant 2023.1.2

Not a solution, but to turn headings off in the card config:

layout:
  mode:
    headings: false

or just toggle off the slider Show mode headings? in the Card Configuration visual editor.

Does anyone know if this issue has already been raised on the Home Assistant frontend issues list? I had a look through but couldnt see it but may have missed as there are a few!

@Scoff123 I don't know that it's an "issue" on the Home Assistant side, per se. Home Assistant is working towards moving translations away from the frontend and over to the backend -- Simple Thermostat is just piggybacking on the frontend translations. This is a growing pain as Home Assistant consolidates their translations paradigm.

Same problem in HA 2023.1.7.

SOLVED

I too had this issue:

prepost

I looked at some of the available configuration options and had the idea of using '_name:' under the "preset" heading and it worked:

postpost

Mike

SOLVED

I too had this issue:

prepost

I looked as some of the available configuration options and had the idea of using '_name:' under the "preset" heading and it worked:

postpost

Mike

Hi Mike,

For me this does not work, it does nothing:

type: custom:simple-thermostat
entity: climate.toon_thermostaat
preset:
  _name: Preset Mode

As soon as I do an ident in front of it, it breaks:

type: custom:simple-thermostat
entity: climate.toon_thermostaat
  preset:
    _name: Preset Mode

Results in:
Configuration errors detected:
bad indentation of a mapping entry (3:9)

1 | type: custom:simple-thermostat
2 | entity: climate.toon_thermostaat
3 | preset:
-------------^
4 | _name: Preset Mode

type: custom:simple-thermostat
entity: climate.toon_thermostaat
preset:
_name: Preset Mode

Wrong indent then. You need to be pedantic about your format and the order it comes. Not always but worth doing it right.

An example of working indent:
image

An example of not working indent:
image

Thank you! @alienatedsec !

Solved it by adding "control" and "hvac" (to keep operation in there, else "operation"disappears and only shows presets):
my current code:

type: custom:simple-thermostat
entity: climate.toon_thermostaat
control:
  hvac: false
  preset:
    _name: Preset Mode

short question: what about the preset itself? I have a wth-2 with following presets:
preset_modes:

  • boost
  • none
  • week_program_1
  • week_program_2
  • week_program_3
  • week_program_4
  • week_program_5
  • week_program_6

can I change these names into shorter names?

@fila612 handle those like this:

      - type: 'custom:simple-thermostat'
        entity: climate.mjolnir_hvac_climate_system
        name: Climate
        control:
          hvac:
            'heat_cool':
              name: "Heat/Cool"
          preset:
            _name: Preset Mode
            'normal':
              name: 'Normal'
            'defrost':
              name: 'Defrost'
            'week_program_1':
              name: 'P1'

perfect! Thank you so much :)

I'm having the same issue except for on the sensors: section as below. Any ideas?

    - type: custom:simple-thermostat
      entity: climate.entrance
      step_size: 0.5
      header: false
      sensors:
        - attribute: preset_mode
          name: Mode

image

thanx!
f157a9b6bbd3f96b759d63b7ea8f657

  • type: custom:simple-thermostat
    entity: climate.entrance
    step_size: 0.5
    header: false
    sensors:
    - attribute: preset_mode
    name: Mode

it has to be _name: Mode not name: Mode

@scstraus