Use _attr_precision in entities (#77477)
This commit is contained in:
parent
d4c020b675
commit
e19e65908a
12 changed files with 14 additions and 73 deletions
|
@ -64,16 +64,12 @@ async def async_setup_entry(
|
|||
class FritzboxThermostat(FritzBoxEntity, ClimateEntity):
|
||||
"""The thermostat class for FRITZ!SmartHome thermostats."""
|
||||
|
||||
_attr_precision = PRECISION_HALVES
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||
)
|
||||
_attr_temperature_unit = TEMP_CELSIUS
|
||||
|
||||
@property
|
||||
def precision(self) -> float:
|
||||
"""Return precision 0.5."""
|
||||
return PRECISION_HALVES
|
||||
|
||||
@property
|
||||
def current_temperature(self) -> float:
|
||||
"""Return the current temperature."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue