mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Use native_precision
instead of round
in Accuweather (#86869)
This commit is contained in:
parent
d2e75e4f7a
commit
cc36848a6d
@ -248,7 +248,8 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
|
|||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
metric_unit=UnitOfLength.METERS,
|
metric_unit=UnitOfLength.METERS,
|
||||||
us_customary_unit=UnitOfLength.FEET,
|
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(
|
AccuWeatherSensorDescription(
|
||||||
key="CloudCover",
|
key="CloudCover",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user