Fix precision of climate devices in devolo Home Control (#41832)

This commit is contained in:
Guido Schmitz 2020-10-22 10:06:16 +02:00 committed by GitHub
parent 9b145a78d9
commit c211275091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ from homeassistant.components.climate import (
ClimateEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import PRECISION_HALVES
from homeassistant.const import PRECISION_HALVES, PRECISION_TENTHS
from homeassistant.helpers.typing import HomeAssistantType
from .const import DOMAIN
@ -60,9 +60,14 @@ class DevoloClimateDeviceEntity(DevoloMultiLevelSwitchDeviceEntity, ClimateEntit
@property
def target_temperature(self) -> Optional[float]:
"""Return the current temperature."""
"""Return the target temperature."""
return self._value
@property
def target_temperature_step(self) -> float:
"""Return the precision of the target temperature."""
return PRECISION_HALVES
@property
def hvac_mode(self) -> str:
"""Return the supported HVAC mode."""
@ -86,7 +91,7 @@ class DevoloClimateDeviceEntity(DevoloMultiLevelSwitchDeviceEntity, ClimateEntit
@property
def precision(self) -> float:
"""Return the precision of the set temperature."""
return PRECISION_HALVES
return PRECISION_TENTHS
@property
def supported_features(self):