Fix round typing [accuweather] (#82433)

This commit is contained in:
Marc Mueller 2022-11-20 22:52:43 +01:00 committed by GitHub
parent e897c8c47c
commit 4bb69fee23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -253,7 +253,7 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
name="Cloud ceiling",
state_class=SensorStateClass.MEASUREMENT,
unit_fn=lambda metric: LENGTH_METERS if metric else LENGTH_FEET,
value_fn=lambda data, unit: round(data[unit][ATTR_VALUE]),
value_fn=lambda data, unit: round(cast(float, data[unit][ATTR_VALUE])),
),
AccuWeatherSensorDescription(
key="CloudCover",