LavermanJJ / home-assistant-solarfocus

🏡 Solarfocus eco manager touch integration for Home Assistant
Apache License 2.0
14 stars 4 forks source link

State names missing after HA 2023.04 update #34

Closed LavermanJJ closed 1 year ago

LavermanJJ commented 1 year ago

image

After updating to 2023.04 the states are no longer translated but the plain numbers are shown.

lein1013 commented 1 year ago

Could this be related to https://github.com/home-assistant/core/commit/8968ed1c47314db4b9ee7eeb302c92c4e71915a3

? based on NON_NUMERIC_DEVICE_CLASSES https://github.com/home-assistant/core/blob/6c7f2167ff0bea90a26cbb08035a8e16a2478acc/homeassistant/components/sensor/const.py#L406

not sure how uptodate the documentation is but according to https://developers.home-assistant.io/docs/core/entity/sensor

based on that I would expect that

    SensorEntityDescription(
        key="vampair_state",
        icon="mdi:heat-pump",
        device_class="solarfocus__hpstate",
    ),

must be somehow changed to something like

    SensorEntityDescription(
        key="vampair_state",
        icon="mdi:heat-pump",
        device_class=SensorDeviceClass.ENUM,
       state_class=StateClass.MEASUREMENT,
        options={
             "0": "Bereitschaft",
      "1": "Heizbetrieb",
...
        },
    ),

Not sure if this should be a dict or a list (base on the doc), and if its opitions or state I wanted to update today, but I think I will now postpone :-)

LavermanJJ commented 1 year ago

Looks like it. Somehow missed that change 😇 try to fix this asap