mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Fix KNX climate entities hvac action without controller_mode (#59522)
* fix hvac action for climate entities without controller_mode * Update homeassistant/components/knx/climate.py Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de> Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de>
This commit is contained in:
parent
d1ee041997
commit
00b1c2bb70
@ -268,10 +268,10 @@ class KNXClimate(KnxEntity, ClimateEntity):
|
|||||||
return CURRENT_HVAC_OFF
|
return CURRENT_HVAC_OFF
|
||||||
if self._device.is_active is False:
|
if self._device.is_active is False:
|
||||||
return CURRENT_HVAC_IDLE
|
return CURRENT_HVAC_IDLE
|
||||||
if self._device.mode is not None and self._device.mode.supports_controller_mode:
|
if (
|
||||||
return CURRENT_HVAC_ACTIONS.get(
|
self._device.mode is not None and self._device.mode.supports_controller_mode
|
||||||
self._device.mode.controller_mode.value, CURRENT_HVAC_IDLE
|
) or self._device.is_active:
|
||||||
)
|
return CURRENT_HVAC_ACTIONS.get(self.hvac_mode, CURRENT_HVAC_IDLE)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
async def async_set_hvac_mode(self, hvac_mode: str) -> None:
|
async def async_set_hvac_mode(self, hvac_mode: str) -> None:
|
||||||
|
@ -79,11 +79,11 @@ CONTROLLER_MODES: Final = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CURRENT_HVAC_ACTIONS: Final = {
|
CURRENT_HVAC_ACTIONS: Final = {
|
||||||
"Heat": CURRENT_HVAC_HEAT,
|
HVAC_MODE_HEAT: CURRENT_HVAC_HEAT,
|
||||||
"Cool": CURRENT_HVAC_COOL,
|
HVAC_MODE_COOL: CURRENT_HVAC_COOL,
|
||||||
"Off": CURRENT_HVAC_OFF,
|
HVAC_MODE_OFF: CURRENT_HVAC_OFF,
|
||||||
"Fan only": CURRENT_HVAC_FAN,
|
HVAC_MODE_FAN_ONLY: CURRENT_HVAC_FAN,
|
||||||
"Dry": CURRENT_HVAC_DRY,
|
HVAC_MODE_DRY: CURRENT_HVAC_DRY,
|
||||||
}
|
}
|
||||||
|
|
||||||
PRESET_MODES: Final = {
|
PRESET_MODES: Final = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user