Home Assistant release with the issue:
0.103.4
Last working Home Assistant release (if known):
0.95 (before HVAC refactor)
Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io
Integration:
Description of problem:
As described in this issue https://github.com/home-assistant/home-assistant/issues/25247#issuecomment-513582743 the XKNX component still have weird behavior.
In hvac_mode climate.py function, set the hvac_mode when supports_on_off is supported and device is on, always set heat mode... I suggest comment/remove the two lines shown like my link.
In hvac_modes climate.py function, HVAC_MODE_HEAT is always added if supports_on_off is supported, so the HVAC_MODE_HEAT is added twice in the supported mode list.
In async_set_hvac_mode climate.py function, when requested mode is HVAC_MODE_HEAT, the code just turn on the device... don't understand why. I suggest to comment the two lines and call systematically turn_on before setting the operation mode.
Here is the updated file I use in my knx custom_component
Happy new year to all of you :)
I also add the hvac_action property as it is missing in the official climate.py and some component use it.
@property
def hvac_action(self):
"""The current HVAC action (heating, cooling)"""
mode = self.hvac_mode
if mode == HVAC_MODE_FAN_ONLY:
return CURRENT_HVAC_IDLE
if mode == HVAC_MODE_HEAT:
return CURRENT_HVAC_HEAT
if mode == HVAC_MODE_COOL:
return CURRENT_HVAC_COOL
if mode == HVAC_MODE_DRY:
return CURRENT_HVAC_DRY
return CURRENT_HVAC_OFF
and by adding
from homeassistant.components.climate.const import (
HVAC_MODE_AUTO,
HVAC_MODE_COOL,
HVAC_MODE_DRY,
HVAC_MODE_FAN_ONLY,
HVAC_MODE_HEAT,
HVAC_MODE_OFF,
PRESET_AWAY,
PRESET_COMFORT,
PRESET_ECO,
PRESET_SLEEP,
SUPPORT_PRESET_MODE,
SUPPORT_TARGET_TEMPERATURE,
CURRENT_HVAC_OFF,
CURRENT_HVAC_HEAT,
CURRENT_HVAC_COOL,
CURRENT_HVAC_DRY,
CURRENT_HVAC_IDLE
)
Hi!
Maybe you could make a pull request against https://github.com/XKNX/xknx so I t could easily be tested.
Hi @jncanches,
I notice the same issues.
Thanks for the fix.
I hope will be fixed in the official branch too!
Hi, do you know if this PR https://github.com/home-assistant/core/pull/33068 fix this issue?
Hi, do you know if this PR #33068 fix this issue?
I will test it tonight on a 0.109 HA version which has just been released.
Unfortunately, the new custom_component does not solve the above problems and still contains those bugs.
As @farmio said, I will try to make a PR for this to work.
I have a question about the freshly released 0.11.3 of xknx component. Is it this version installed and used by HA 0.109 ?
Thanks
@jncanches No. We released it just yesterday (and forgot to push it to pypi).
OK, that's probably why the new custom_component does not work on 0.109.
I will wait for it into HA, test my patch on the custom_component and submit the PR.
Thanks !
Hi, any news on this topic? The PR now it was integrated?
Hi, any news on this fix?
Because with last update the files changed as custom components don't work anymore...
Custom component is working fine for me... I have HA 0.113.3.
What are your errors in log ?
Sorry, probably it's another problem, related to scene...
I have opened another issue https://github.com/home-assistant/core/issues/38538
But it would be useful that this PR will be integrated.
@jncanches thanks for your code! I've fixed my setup and now can properly control two AC units. I hope this bug will be eventually fixed and merged into master. I've made a pull request, so anyone who has this issue can now try it and report if it works for them.
Most helpful comment
@jncanches thanks for your code! I've fixed my setup and now can properly control two AC units. I hope this bug will be eventually fixed and merged into master. I've made a pull request, so anyone who has this issue can now try it and report if it works for them.