Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT climate slider is not correct if min/max_temp are configured #271

Open
4 tasks done
HelgeBoehme opened this issue Mar 20, 2023 · 4 comments
Open
4 tasks done

Comments

@HelgeBoehme
Copy link

HelgeBoehme commented Mar 20, 2023

My Home Assistant version: 2023.3.1
Frontend 20230302.0 - latest
slider-entity-row: 17.3.0

My lovelace configuration method (GUI or yaml): both

What I am doing:
I created integration from https://www.home-assistant.io/integrations/climate.mqtt/ and configured min and max_temp and step (in my case 7.5, 25 and 0.5).
Then I added custom:slider-entity-row using that climate entity.

What I expected to happen:
Slider swings between min and max value with configured step. On mouse-button-release, new value is submitted to entity.

What happened instead:
Slider always jumps to max value +1 (26 in my case). Moving slider only shows integer value changes. After mouse-button-release, slider jumps back to max value. The max value (25) is submitted to the entity regardless from position of release.
If I remove min/max_temp from the config, I can use the slider with the default range at integer steps.

For comparison I created input-number with the same range and step. Here everything works as expected.

Minimal steps to reproduce:

mqtt:
  climate:
    - name: Heizung Wohnzimmer
      object_id: comet_wohnzimmer
      unique_id: climate.comet_wohnzimmer
      temperature_unit: C
      initial: 7.5
      min_temp: 7.5
      max_temp: 25.0
      precision: 0.5
      temp_step: 0.5
[...]
input_number:
  comet_wohnzimmer_temp_set:
    name: Heizung Wohnzimmer
    min: 7.5
    max: 25
    step: 0.5
    unit_of_measurement: °C
    icon: mdi:thermometer
    cards:
      - type: entities
        entities:
          - entity: climate.comet_wohnzimmer
            type: custom:slider-entity-row
          - entity: input_number.comet_wohnzimmer_temp_set
            type: custom:slider-entity-row

image

Workaround:
Adding same values to custom:slider-entity-row:

          - entity: climate.comet_wohnzimmer
            type: custom:slider-entity-row
            min: 7.5
            max: 25
            step: 0.5    

By putting an X in the boxes ([X]) below, I indicate that I:

  • Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
  • Have made sure I am using the latest version of the plugin.
  • Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
  • Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
@thomasloven
Copy link
Owner

thomasloven commented Nov 11, 2023

Could you show what the attributes of your climate entity looks like in developer-tools/state ?
Open your Home Assistant instance and show your state developer tools.

Something like this
bild

@HelgeBoehme
Copy link
Author

Hello Thomas,
mine looks like this:
image
I'm still using the workaround from above.

@thomasloven
Copy link
Owner

That max_temp does not at all agree with the configuration code you posted. I suggest you start by finding out why that is.

@HelgeBoehme
Copy link
Author

Hello Thomas, I just checked. My max_temp changed from 25.0 to 28.5 since I created the bug description. But I can still reproduce if I remove the workaround from my custom:slider-entity-row definition. FYI, the attributes window, keylock and topic are just added by json_attributes_template and do not interact with this bug. I'm still using version 17.3.0, and HA core 2023.3.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants