diff --git a/homeassistant/components/incomfort/climate.py b/homeassistant/components/incomfort/climate.py index d18a41d5bf0..c76f16093ee 100644 --- a/homeassistant/components/incomfort/climate.py +++ b/homeassistant/components/incomfort/climate.py @@ -3,12 +3,8 @@ from __future__ import annotations from typing import Any -from homeassistant.components.climate import ( - DOMAIN as CLIMATE_DOMAIN, - ClimateEntity, - ClimateEntityFeature, -) -from homeassistant.components.climate.const import HVAC_MODE_HEAT +from homeassistant.components.climate import DOMAIN as CLIMATE_DOMAIN, ClimateEntity +from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -38,6 +34,8 @@ async def async_setup_platform( class InComfortClimate(IncomfortChild, ClimateEntity): """Representation of an InComfort/InTouch climate device.""" + _attr_hvac_mode = HVACMode.HEAT + _attr_hvac_modes = [HVACMode.HEAT] _attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE def __init__(self, client, heater, room) -> None: @@ -61,16 +59,6 @@ class InComfortClimate(IncomfortChild, ClimateEntity): """Return the unit of measurement.""" return TEMP_CELSIUS - @property - def hvac_mode(self) -> str: - """Return hvac operation ie. heat, cool mode.""" - return HVAC_MODE_HEAT - - @property - def hvac_modes(self) -> list[str]: - """Return the list of available hvac operation modes.""" - return [HVAC_MODE_HEAT] - @property def current_temperature(self) -> float | None: """Return the current temperature.""" @@ -96,5 +84,5 @@ class InComfortClimate(IncomfortChild, ClimateEntity): temperature = kwargs.get(ATTR_TEMPERATURE) await self._room.set_override(temperature) - async def async_set_hvac_mode(self, hvac_mode: str) -> None: + async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: """Set new target hvac mode."""