From cc36848a6d06557c63c6340701eb4892113222dd Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Mon, 30 Jan 2023 12:36:24 +0100 Subject: [PATCH] Use `native_precision` instead of `round` in Accuweather (#86869) --- homeassistant/components/accuweather/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/accuweather/sensor.py b/homeassistant/components/accuweather/sensor.py index 8ce382d2538..4de089f9cf3 100644 --- a/homeassistant/components/accuweather/sensor.py +++ b/homeassistant/components/accuweather/sensor.py @@ -248,7 +248,8 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = ( state_class=SensorStateClass.MEASUREMENT, metric_unit=UnitOfLength.METERS, us_customary_unit=UnitOfLength.FEET, - value_fn=lambda data, unit: round(cast(float, data[unit][ATTR_VALUE])), + value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]), + native_precision=0, ), AccuWeatherSensorDescription( key="CloudCover",