mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Use HAVCMode enum in BSB-Lan climate (#94638)
This commit is contained in:
parent
908f3386e7
commit
998a45879e
@ -23,6 +23,7 @@ from homeassistant.helpers.update_coordinator import (
|
||||
CoordinatorEntity,
|
||||
DataUpdateCoordinator,
|
||||
)
|
||||
from homeassistant.util.enum import try_parse_enum
|
||||
|
||||
from . import HomeAssistantBSBLANData
|
||||
from .const import ATTR_TARGET_TEMPERATURE, DOMAIN, LOGGER
|
||||
@ -112,12 +113,11 @@ class BSBLANClimate(
|
||||
return float(self.coordinator.data.target_temperature.value)
|
||||
|
||||
@property
|
||||
def hvac_mode(self) -> str:
|
||||
def hvac_mode(self) -> HVACMode | None:
|
||||
"""Return hvac operation ie. heat, cool mode."""
|
||||
if self.coordinator.data.hvac_mode.value == PRESET_ECO:
|
||||
return HVACMode.AUTO
|
||||
|
||||
return self.coordinator.data.hvac_mode.value
|
||||
return try_parse_enum(HVACMode, self.coordinator.data.hvac_mode.value)
|
||||
|
||||
@property
|
||||
def preset_mode(self) -> str | None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user