mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
parent
f9eee0e9d7
commit
640d8b40f0
@ -6,7 +6,11 @@ from typing import Any
|
|||||||
from aiosenz import MODE_AUTO, Thermostat
|
from aiosenz import MODE_AUTO, Thermostat
|
||||||
|
|
||||||
from homeassistant.components.climate import ClimateEntity
|
from homeassistant.components.climate import ClimateEntity
|
||||||
from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
|
from homeassistant.components.climate.const import (
|
||||||
|
ClimateEntityFeature,
|
||||||
|
HVACAction,
|
||||||
|
HVACMode,
|
||||||
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_TENTHS, TEMP_CELSIUS
|
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_TENTHS, TEMP_CELSIUS
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
@ -85,6 +89,11 @@ class SENZClimate(CoordinatorEntity, ClimateEntity):
|
|||||||
return HVACMode.AUTO
|
return HVACMode.AUTO
|
||||||
return HVACMode.HEAT
|
return HVACMode.HEAT
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hvac_action(self) -> HVACAction:
|
||||||
|
"""Return current hvac action."""
|
||||||
|
return HVACAction.HEATING if self._thermostat.is_heating else HVACAction.IDLE
|
||||||
|
|
||||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||||
"""Set new target hvac mode."""
|
"""Set new target hvac mode."""
|
||||||
if hvac_mode == HVACMode.AUTO:
|
if hvac_mode == HVACMode.AUTO:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user