diff --git a/homeassistant/components/elkm1/climate.py b/homeassistant/components/elkm1/climate.py index 8bbf776c475..6eca3083b3a 100644 --- a/homeassistant/components/elkm1/climate.py +++ b/homeassistant/components/elkm1/climate.py @@ -74,6 +74,7 @@ async def async_setup_entry( class ElkThermostat(ElkEntity, ClimateEntity): """Representation of an Elk-M1 Thermostat.""" + _attr_precision = PRECISION_WHOLE _attr_supported_features = ( ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.AUX_HEAT @@ -138,11 +139,6 @@ class ElkThermostat(ElkEntity, ClimateEntity): """Return the list of available operation modes.""" return SUPPORT_HVAC - @property - def precision(self) -> int: - """Return the precision of the system.""" - return PRECISION_WHOLE - @property def is_aux_heat(self) -> bool: """Return if aux heater is on.""" diff --git a/homeassistant/components/fritzbox/climate.py b/homeassistant/components/fritzbox/climate.py index 20331459c3e..10fd3cf0177 100644 --- a/homeassistant/components/fritzbox/climate.py +++ b/homeassistant/components/fritzbox/climate.py @@ -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.""" diff --git a/homeassistant/components/gree/climate.py b/homeassistant/components/gree/climate.py index 6d8f32aa21c..4096f58e4cb 100644 --- a/homeassistant/components/gree/climate.py +++ b/homeassistant/components/gree/climate.py @@ -113,6 +113,7 @@ async def async_setup_entry( class GreeClimateEntity(CoordinatorEntity, ClimateEntity): """Representation of a Gree HVAC device.""" + _attr_precision = PRECISION_WHOLE _attr_supported_features = ( ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE @@ -152,11 +153,6 @@ class GreeClimateEntity(CoordinatorEntity, ClimateEntity): units = self.coordinator.device.temperature_units return TEMP_CELSIUS if units == TemperatureUnits.C else TEMP_FAHRENHEIT - @property - def precision(self) -> float: - """Return the precision of temperature for the device.""" - return PRECISION_WHOLE - @property def current_temperature(self) -> float: """Return the reported current temperature for the device.""" diff --git a/homeassistant/components/hisense_aehw4a1/climate.py b/homeassistant/components/hisense_aehw4a1/climate.py index 246a04df9a8..3213c5f9414 100644 --- a/homeassistant/components/hisense_aehw4a1/climate.py +++ b/homeassistant/components/hisense_aehw4a1/climate.py @@ -142,6 +142,7 @@ class ClimateAehW4a1(ClimateEntity): """Representation of a Hisense AEH-W4A1 module for climate device.""" _attr_hvac_modes = HVAC_MODES + _attr_precision = PRECISION_WHOLE _attr_supported_features = ( ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE @@ -294,11 +295,6 @@ class ClimateAehW4a1(ClimateEntity): return MAX_TEMP_C return MAX_TEMP_F - @property - def precision(self): - """Return the precision of the system.""" - return PRECISION_WHOLE - @property def target_temperature_step(self): """Return the supported step of target temperature.""" diff --git a/homeassistant/components/isy994/climate.py b/homeassistant/components/isy994/climate.py index 9f4c52258a7..bc1f0353455 100644 --- a/homeassistant/components/isy994/climate.py +++ b/homeassistant/components/isy994/climate.py @@ -76,6 +76,7 @@ class ISYThermostatEntity(ISYNodeEntity, ClimateEntity): """Representation of an ISY994 thermostat entity.""" _attr_hvac_modes = ISY_HVAC_MODES + _attr_precision = PRECISION_TENTHS _attr_supported_features = ( ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.TARGET_TEMPERATURE @@ -96,11 +97,6 @@ class ISYThermostatEntity(ISYNodeEntity, ClimateEntity): self._target_temp_low = 0 self._target_temp_high = 0 - @property - def precision(self) -> float: - """Return the precision of the system.""" - return PRECISION_TENTHS - @property def temperature_unit(self) -> str: """Return the unit of measurement.""" diff --git a/homeassistant/components/izone/climate.py b/homeassistant/components/izone/climate.py index 8ff1593d5ff..2c181d90fda 100644 --- a/homeassistant/components/izone/climate.py +++ b/homeassistant/components/izone/climate.py @@ -126,6 +126,7 @@ def _return_on_connection_error(ret=None): class ControllerDevice(ClimateEntity): """Representation of iZone Controller.""" + _attr_precision = PRECISION_TENTHS _attr_should_poll = False _attr_temperature_unit = TEMP_CELSIUS @@ -253,11 +254,6 @@ class ControllerDevice(ClimateEntity): """Return the name of the entity.""" return f"iZone Controller {self._controller.device_uid}" - @property - def precision(self) -> float: - """Return the precision of the system.""" - return PRECISION_TENTHS - @property def extra_state_attributes(self): """Return the optional state attributes.""" @@ -438,6 +434,7 @@ class ControllerDevice(ClimateEntity): class ZoneDevice(ClimateEntity): """Representation of iZone Zone.""" + _attr_precision = PRECISION_TENTHS _attr_should_poll = False _attr_temperature_unit = TEMP_CELSIUS @@ -526,11 +523,6 @@ class ZoneDevice(ClimateEntity): return self._attr_supported_features return self._attr_supported_features & ~ClimateEntityFeature.TARGET_TEMPERATURE - @property - def precision(self): - """Return the precision of the system.""" - return PRECISION_TENTHS - @property def hvac_mode(self) -> HVACMode | None: """Return current operation ie. heat, cool, idle.""" diff --git a/homeassistant/components/proliphix/climate.py b/homeassistant/components/proliphix/climate.py index 52ed3bb8bcd..1952a6f186a 100644 --- a/homeassistant/components/proliphix/climate.py +++ b/homeassistant/components/proliphix/climate.py @@ -54,6 +54,7 @@ def setup_platform( class ProliphixThermostat(ClimateEntity): """Representation a Proliphix thermostat.""" + _attr_precision = PRECISION_TENTHS _attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE _attr_temperature_unit = TEMP_FAHRENHEIT @@ -72,15 +73,6 @@ class ProliphixThermostat(ClimateEntity): """Return the name of the thermostat.""" return self._name - @property - def precision(self): - """Return the precision of the system. - - Proliphix temperature values are passed back and forth in the - API as tenths of degrees F (i.e. 690 for 69 degrees). - """ - return PRECISION_TENTHS - @property def extra_state_attributes(self): """Return the device specific state attributes.""" diff --git a/homeassistant/components/venstar/climate.py b/homeassistant/components/venstar/climate.py index efa1c56ccbc..798ffe5b6d3 100644 --- a/homeassistant/components/venstar/climate.py +++ b/homeassistant/components/venstar/climate.py @@ -106,6 +106,7 @@ class VenstarThermostat(VenstarEntity, ClimateEntity): _attr_fan_modes = [FAN_ON, FAN_AUTO] _attr_hvac_modes = [HVACMode.HEAT, HVACMode.COOL, HVACMode.OFF, HVACMode.AUTO] + _attr_precision = PRECISION_HALVES def __init__( self, @@ -139,15 +140,6 @@ class VenstarThermostat(VenstarEntity, ClimateEntity): return features - @property - def precision(self): - """Return the precision of the system. - - Venstar temperature values are passed back and forth in the - API in C or F, with half-degree accuracy. - """ - return PRECISION_HALVES - @property def temperature_unit(self): """Return the unit of measurement, as defined by the API.""" diff --git a/homeassistant/components/vicare/climate.py b/homeassistant/components/vicare/climate.py index 94f7b8d4e5d..53759b42243 100644 --- a/homeassistant/components/vicare/climate.py +++ b/homeassistant/components/vicare/climate.py @@ -142,6 +142,7 @@ async def async_setup_entry( class ViCareClimate(ClimateEntity): """Representation of the ViCare heating climate device.""" + _attr_precision = PRECISION_TENTHS _attr_supported_features = ( ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE ) @@ -320,11 +321,6 @@ class ViCareClimate(ClimateEntity): """Return the maximum temperature.""" return VICARE_TEMP_HEATING_MAX - @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.""" diff --git a/homeassistant/components/vicare/water_heater.py b/homeassistant/components/vicare/water_heater.py index ae8456cac6f..878f2ac47a5 100644 --- a/homeassistant/components/vicare/water_heater.py +++ b/homeassistant/components/vicare/water_heater.py @@ -100,6 +100,7 @@ async def async_setup_entry( class ViCareWater(WaterHeaterEntity): """Representation of the ViCare domestic hot water device.""" + _attr_precision = PRECISION_TENTHS _attr_supported_features = WaterHeaterEntityFeature.TARGET_TEMPERATURE def __init__(self, name, api, circuit, device_config, heating_type): @@ -197,11 +198,6 @@ class ViCareWater(WaterHeaterEntity): """Set target temperature step to wholes.""" return PRECISION_WHOLE - @property - def precision(self): - """Return the precision of the system.""" - return PRECISION_TENTHS - @property def current_operation(self): """Return current operation ie. heat, cool, idle.""" diff --git a/homeassistant/components/zha/climate.py b/homeassistant/components/zha/climate.py index 416d0c81483..573b3df44fa 100644 --- a/homeassistant/components/zha/climate.py +++ b/homeassistant/components/zha/climate.py @@ -137,6 +137,7 @@ class Thermostat(ZhaEntity, ClimateEntity): DEFAULT_MAX_TEMP = 35 DEFAULT_MIN_TEMP = 7 + _attr_precision = PRECISION_TENTHS _attr_temperature_unit = TEMP_CELSIUS def __init__(self, unique_id, zha_device, channels, **kwargs): @@ -264,11 +265,6 @@ class Thermostat(ZhaEntity, ClimateEntity): """Return the list of available HVAC operation modes.""" return SEQ_OF_OPERATION.get(self._thrm.ctrl_sequence_of_oper, [HVACMode.OFF]) - @property - def precision(self): - """Return the precision of the system.""" - return PRECISION_TENTHS - @property def preset_mode(self) -> str: """Return current preset mode.""" diff --git a/homeassistant/components/zwave_js/climate.py b/homeassistant/components/zwave_js/climate.py index d8037643488..b0a5cdfe295 100644 --- a/homeassistant/components/zwave_js/climate.py +++ b/homeassistant/components/zwave_js/climate.py @@ -126,6 +126,8 @@ async def async_setup_entry( class ZWaveClimate(ZWaveBaseEntity, ClimateEntity): """Representation of a Z-Wave climate.""" + _attr_precision = PRECISION_TENTHS + def __init__( self, config_entry: ConfigEntry, driver: Driver, info: ZwaveDiscoveryInfo ) -> None: @@ -251,11 +253,6 @@ class ZWaveClimate(ZWaveBaseEntity, ClimateEntity): return TEMP_FAHRENHEIT return TEMP_CELSIUS - @property - def precision(self) -> float: - """Return the precision of 0.1.""" - return PRECISION_TENTHS - @property def hvac_mode(self) -> HVACMode: """Return hvac operation ie. heat, cool mode."""