nervetattoo / simple-thermostat

A different take on the thermostat card for Home Assistant ♨️
MIT License
739 stars 110 forks source link

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

Open wigster opened 1 year ago

wigster commented 1 year ago

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

acshef commented 1 year ago

This was caused by this Home Assistant frontend commit: https://github.com/home-assistant/frontend/commit/0e70b866aeb369784697949539496414e64cb641 Here's the line that got removed: https://github.com/home-assistant/frontend/commit/0e70b866aeb369784697949539496414e64cb641#diff-e67939fd25c650222db710f18764d10ae69454b0e8ad680f5e10177c2db93ceaL155

lesourcil commented 1 year ago

Same issue

roycwalton commented 1 year ago

Same issue running 2023.01.04 HA.

acmeGR commented 1 year ago

Same issue Home Assistant 2023.1.2

mcormick commented 1 year ago

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.

Scoff123 commented 1 year ago

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!

acshef commented 1 year ago

@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.

davel4wa commented 1 year ago

Same problem in HA 2023.1.7.

B1ackCr0 commented 1 year ago

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

prolife86 commented 1 year ago

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

alienatedsec commented 1 year ago
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

prolife86 commented 1 year ago

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
fila612 commented 1 year ago

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

can I change these names into shorter names?

finder39 commented 1 year ago

@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'
fila612 commented 1 year ago

perfect! Thank you so much :)

scstraus commented 1 year ago

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
xiangboshihub commented 10 months ago

thanx!

f157a9b6bbd3f96b759d63b7ea8f657
alienatedsec commented 10 months ago
  • 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