home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.81k stars 30.51k forks source link

KNX Climate (Thermostat) Not Working Properly On 2024.6.0 #118982

Closed txtasosxt closed 4 months ago

txtasosxt commented 4 months ago

The problem

The climate control of a KNX entity fails to properly handle the "on_off_address". What I've noticed is that after the 2024.6.0 update, when I select the "Off" from the Modes dropdown, there's no telegram sent to the KNX to disable the thermostat. Also when the KNX integration in HA is restarted, HA thinks the thermostat is Off and even when I try to set it to another mode (Cooling or Heating), it'll send the telegram for Heat/Cool but it'll keep showing as Off in the HA.

Here are two recordings comparing the 2 versions: 2024.5.5: https://github.com/home-assistant/core/assets/10602079/8a3799b6-5a96-4f37-bf0a-eaa32798b97b 2024.6.0: https://github.com/home-assistant/core/assets/10602079/5ec90264-5e2b-4f59-8d57-f434c926b2c7

PS: Note that, even though in the 2024.6.0 recording it seems like the thermostat is being disabled when selecting the "Off" mode, no such change is really happening in the KNX as it can be seen from the Group Monitoring window.

What version of Home Assistant Core has the issue?

core-2024.6.0

What was the last working version of Home Assistant Core?

core-2024.5.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

KNX

Link to integration documentation on our website

https://www.home-assistant.io/integrations/knx/#climate

Diagnostics information

No response

Example YAML snippet

climate:
  - name: "Living Room Climate"
    temperature_address: 3/4/17
    temperature_step: 0.5
    target_temperature_state_address: 3/4/0
    setpoint_shift_address: 3/5/1
    setpoint_shift_state_address: 3/4/2
    setpoint_shift_mode: DPT9002
    setpoint_shift_min: -5
    setpoint_shift_max: 5
    active_state_address: 3/4/13
    command_value_state_address: 3/1/0
    operation_mode_address: 3/5/0
    operation_mode_state_address: 3/4/1
    heat_cool_address: 0/0/4
    heat_cool_state_address: 3/4/15
    controller_modes:
      - "Off"
      # - "Auto"
      - "Heat"
      - "Cool"
    on_off_address: 3/5/12
    # on_off_state_address: 3/5/12
  - name: "Bedroom Climate"
    temperature_address: 3/4/34
    temperature_step: 0.5
    target_temperature_state_address: 3/4/18
    setpoint_shift_address: 3/5/15
    setpoint_shift_state_address: 3/4/20
    setpoint_shift_mode: DPT9002
    setpoint_shift_min: -5
    setpoint_shift_max: 5
    active_state_address: 3/4/31
    command_value_state_address: 3/1/2
    operation_mode_address: 3/5/14
    operation_mode_state_address: 3/4/19
    heat_cool_address: 0/0/4
    heat_cool_state_address: 3/4/32
    controller_modes:
      - "Off"
      # - "Auto"
      - "Heat"
      - "Cool"
    on_off_address: 3/5/24
    # on_off_state_address: 3/5/24

Anything in the logs that might be useful for us?

There were no related logs that I could find

Additional information

No response

home-assistant[bot] commented 4 months ago

Hey there @julius2342, @farmio, @marvin-w, mind taking a look at this issue as it has been labeled with an integration (knx) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `knx` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign knx` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


knx documentation knx source (message by IssueLinks)

farmio commented 4 months ago

Hi 👋!

Also when the KNX integration in HA is restarted, HA thinks the thermostat is Off

This is probably due to the missing on_off_state_address. I would think this did always behave that way.

when I try to set it to another mode (Cooling or Heating), it'll send the telegram for Heat/Cool but it'll keep showing as Off in the HA

Awkward... why is this happening in the left climate entity, but not in the right one (the first one in the second recording)? They seem to be configured the same.

Could you please record the events that are fired for those entities when you do that Open your Home Assistant instance and show your event developer tools.

Also please try to remove this

    controller_modes:
      - "Off"
      # - "Auto"
      - "Heat"
      - "Cool"

and have a look at the states the climate entity is reporting. Open your Home Assistant instance and show your state developer tools.

txtasosxt commented 4 months ago

Hello👋!

This is probably due to the missing on_off_state_address. I would think this did always behave that way.

I'm not sure if this was always the case, I suppose that after a restart of either the KNX system or HA, it would "forget" the last state and without a state_address, it would show as off. But previously I would set it manually or through an automation to Cooling/Heating and it wouldn't turn back to off, now it's getting stuck to "Off" after a restart.

Awkward... why is this happening in the left climate entity, but not in the right one (the first one in the second recording)? They seem to be configured the same.

Oh sorry for the confusion, I just tricked it by manually sending a Write telegram in the on_off_address group (which are the 3/5/12 and 3/5/24). This is the only way to get the climates to show as active for now.

txtasosxt commented 4 months ago

Also please try to remove this


    controller_modes:
      - "Off"
      # - "Auto"
      - "Heat"
      - "Cool"

Removing the controller_modes didn't have any effect, I would expect "Auto" to appear in the drop-down list but it did not! I don't use an "Auto" in the thermostat either, which is why I had commented it out in my config.

and have a look at the states the climate entity is reporting.

To me they appear normal, the only weird thing I see is that the off mode has quotes while the other options don't! But I know that's not affecting anything. The following attributes are displayed (after having removed the controller_modes)

When the climate is shown as active and cooling:

hvac_modes:
  - "off"
  - heat
  - cool
min_temp: 17
max_temp: 27
target_temp_step: 0.5
preset_modes:
  - away
  - none
  - sleep
  - comfort
  - eco
current_temperature: 22.6
temperature: 22.5
hvac_action: idle
preset_mode: comfort
command_value: 35
friendly_name: Bedroom Climate (Θερμοστάτης)
supported_features: 401

When the climate is bugged after a restart and is shown as off:

hvac_modes:
  - "off"
  - heat
  - cool
min_temp: 17
max_temp: 27
target_temp_step: 0.5
preset_modes:
  - away
  - none
  - sleep
  - comfort
  - eco
friendly_name: Bedroom Climate (Θερμοστάτης)
supported_features: 401
hvac_action: "off"
preset_mode: comfort
current_temperature: 22.6
temperature: 22.5
command_value: 100

Only HVAC action is different. I'm gonna try create a fake on_off_state address because my thermostat doesn't provide one!

txtasosxt commented 4 months ago

Got a lot more info now!

Removing the

    controller_modes:
      - "Off"
      # - "Auto"
      - "Heat"
      - "Cool"

did make a difference after all, now when I'm trying to disable a climate it does send a "Disable" telegram. image I was able to reproduce it twice, when I set the controller_modes it will not send a Disable telegram. The problem still exists when trying to enable it though, either because the device is disabled or because Home Assistant "thinks" it's disabled. It sends a cooling or heating command but it'll not send an Enable, so the device stays disabled. I rewatched the recording and in the 2024.5.5 it was sending both the cooling and the Enable commands.

Also, as expected, having a state group helps when either HA or KNX is restarted, the initial state of the climate will be correct. But it's the main issue (not being able to activate it)

farmio commented 4 months ago

when I set the controller_modes it will not send a Disable telegram.

Ok, interesting. That's very useful information - i'll look into that. This controller_modes configuration option is not very useful imho - maybe it's better to deprecate it 😬

It sends a cooling or heating command but it'll not send an Enable

There was a new service introduced: climate.turn_on. Previously there was only climate.set_hvac_mode. Now that these are separate things, I guess one can set a new mode without turning on... but it seems the UI doesn't think that way 🙃