nervetattoo / simple-thermostat

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

Sensibo: Fan controls now listed in alphabetical order #397

Closed Talismanian closed 11 months ago

Talismanian commented 1 year ago

Describe the bug Basically, fan controls aren't in the order listed in config anymore, but in alphabetical order. This has occurred with HA 2023.8.0, supervisor 2023.07.1, OS 10.4, frontend 20230802.0.

To Reproduce Set up your thermostat card with the fan control speeds listed for your climate entity. If they're labelled alphabetically, you will see them ordered in the same way, regardless of where you position them in the config.

Expected behavior In previous versions (HA 2023.7 and earlier), the card displayed the fan speeds in order as listed in the config.

entity: climate.downstairs
type: custom:simple-thermostat
layout:
  step: row
  mode:
    headings: false
    names: false
step_size: '1'
decimals: '0'
control:
  hvac: true
  fan:
    _hide_when_off: true
    quiet: false
    strong: false
    low:
      name: Low
      icon: mdi:fan-speed-1
    medium:
      name: Medium
      icon: mdi:fan-speed-2
    high:
      name: High
      icon: mdi:fan-speed-3
    auto:
      name: Auto
      icon: mdi:fan-auto

Screenshots image

(I've written in the names of the fan modes, A for auto, H for high, L for low, M for medium. Notice how they're now in alphabetical order.)

Browser

gitrummy commented 1 year ago

+1

TTLucian commented 1 year ago

Same here

Talismanian commented 1 year ago

Hi everyone, I wanted to find out what integration was serving your climate entities. In my case, it's Sensibo. It seems this bug might not be universal across all integrations.

gitrummy commented 1 year ago

Hi everyone, I wanted to find out what integration was serving your climate entities. In my case, it's Sensibo. It seems this bug might not be universal across all integrations.

Sensibo for me :)

TTLucian commented 1 year ago

Sensibo

Talismanian commented 1 year ago

I've noticed the issue is related to the order in which fan speeds are enumerated in the entity's fan_modes attribute.

I can temporarily change the order of the fan modes by setting the attributes in Developer Tools > States. But the order will revert back after a moment when HA refreshes the entity from Sensibo.

I'm waiting to hear back from a friend with an older version of the Sensibo integration installed to double-check if this behaviour was introduced in the latest update.

gitrummy commented 1 year ago

I've noticed the issue is related to the order in which fan speeds are enumerated in the entity's fan_modes attribute.

I can temporarily change the order of the fan modes by setting the attributes in Developer Tools > States. But the order will revert back after a moment when HA refreshes the entity from Sensibo.

I'm waiting to hear back from a friend with an older version of the Sensibo integration installed to double-check if this behaviour was introduced in the latest update.

I've got heaps of backups if you need someone to go back and test anything

Talismanian commented 1 year ago

FYI I've tested on an older version of HA pre-2023.8 and the behaviour is normal. I've logged an issue on HA Core to see if there's any way of fixing this. But the ultimate resolution would be for Simple Thermostat to arrange fan speeds by their order listed in config.

Talismanian commented 11 months ago

FYI a PR has been merged in HA core for changes to pysensibo. It claims to directly address this issue around fan modes being enumerated alphabetically. Let's wait and see how this goes once it's pushed out to the release.

Talismanian commented 11 months ago

Issue has been resolved in HA 2023.10