Use climate enums in zwave_me (#70756)
This commit is contained in:
parent
a7bb74e151
commit
d2c31de4ba
1 changed files with 4 additions and 12 deletions
|
@ -3,8 +3,8 @@ from __future__ import annotations
|
|||
|
||||
from zwave_me_ws import ZWaveMeData
|
||||
|
||||
from homeassistant.components.climate import ClimateEntity, ClimateEntityFeature
|
||||
from homeassistant.components.climate.const import HVAC_MODE_HEAT
|
||||
from homeassistant.components.climate import ClimateEntity
|
||||
from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_TEMPERATURE
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
|
@ -48,6 +48,8 @@ async def async_setup_entry(
|
|||
class ZWaveMeClimate(ZWaveMeEntity, ClimateEntity):
|
||||
"""Representation of a ZWaveMe sensor."""
|
||||
|
||||
_attr_hvac_mode = HVACMode.HEAT
|
||||
_attr_hvac_modes = [HVACMode.HEAT]
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
|
||||
def set_temperature(self, **kwargs) -> None:
|
||||
|
@ -79,16 +81,6 @@ class ZWaveMeClimate(ZWaveMeEntity, ClimateEntity):
|
|||
"""Return max temperature for the device."""
|
||||
return self.device.min
|
||||
|
||||
@property
|
||||
def hvac_modes(self) -> list[str]:
|
||||
"""Return the list of available operation modes."""
|
||||
return [HVAC_MODE_HEAT]
|
||||
|
||||
@property
|
||||
def hvac_mode(self) -> str:
|
||||
"""Return the current mode."""
|
||||
return HVAC_MODE_HEAT
|
||||
|
||||
@property
|
||||
def target_temperature_step(self) -> float:
|
||||
"""Return the supported step of target temperature."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue