mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix precision of vicare target & current temperature (#66456)
This commit is contained in:
parent
f0dba8ec70
commit
2c8bf006eb
@ -24,7 +24,12 @@ from homeassistant.components.climate.const import (
|
||||
SUPPORT_TARGET_TEMPERATURE,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_WHOLE, TEMP_CELSIUS
|
||||
from homeassistant.const import (
|
||||
ATTR_TEMPERATURE,
|
||||
PRECISION_TENTHS,
|
||||
PRECISION_WHOLE,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import entity_platform
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@ -310,6 +315,11 @@ class ViCareClimate(ClimateEntity):
|
||||
@property
|
||||
def precision(self):
|
||||
"""Return the precision of the system."""
|
||||
return PRECISION_TENTHS
|
||||
|
||||
@property
|
||||
def target_temperature_step(self) -> float:
|
||||
"""Set target temperature step to wholes."""
|
||||
return PRECISION_WHOLE
|
||||
|
||||
def set_temperature(self, **kwargs):
|
||||
|
@ -14,7 +14,12 @@ from homeassistant.components.water_heater import (
|
||||
WaterHeaterEntity,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_WHOLE, TEMP_CELSIUS
|
||||
from homeassistant.const import (
|
||||
ATTR_TEMPERATURE,
|
||||
PRECISION_TENTHS,
|
||||
PRECISION_WHOLE,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
@ -191,10 +196,15 @@ class ViCareWater(WaterHeaterEntity):
|
||||
"""Return the maximum temperature."""
|
||||
return VICARE_TEMP_WATER_MAX
|
||||
|
||||
@property
|
||||
def target_temperature_step(self) -> float:
|
||||
"""Set target temperature step to wholes."""
|
||||
return PRECISION_WHOLE
|
||||
|
||||
@property
|
||||
def precision(self):
|
||||
"""Return the precision of the system."""
|
||||
return PRECISION_WHOLE
|
||||
return PRECISION_TENTHS
|
||||
|
||||
@property
|
||||
def current_operation(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user