Add explanatory comment to metoffice (#83914)

This commit is contained in:
Erik Montnemery
2022-12-13 11:03:18 +01:00
committed by GitHub
parent cc5d319369
commit 0f5c678708

View File

@@ -81,6 +81,8 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
key="wind_speed", key="wind_speed",
name="Wind speed", name="Wind speed",
native_unit_of_measurement=UnitOfSpeed.MILES_PER_HOUR, native_unit_of_measurement=UnitOfSpeed.MILES_PER_HOUR,
# Hint mph because that's the preferred unit for wind speeds in UK
# This can be removed if we add a mixed metric/imperial unit system for UK users
suggested_unit_of_measurement=UnitOfSpeed.MILES_PER_HOUR, suggested_unit_of_measurement=UnitOfSpeed.MILES_PER_HOUR,
device_class=SensorDeviceClass.WIND_SPEED, device_class=SensorDeviceClass.WIND_SPEED,
entity_registry_enabled_default=True, entity_registry_enabled_default=True,
@@ -95,6 +97,8 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
key="wind_gust", key="wind_gust",
name="Wind gust", name="Wind gust",
native_unit_of_measurement=UnitOfSpeed.MILES_PER_HOUR, native_unit_of_measurement=UnitOfSpeed.MILES_PER_HOUR,
# Hint mph because that's the preferred unit for wind speeds in UK
# This can be removed if we add a mixed metric/imperial unit system for UK users
suggested_unit_of_measurement=UnitOfSpeed.MILES_PER_HOUR, suggested_unit_of_measurement=UnitOfSpeed.MILES_PER_HOUR,
device_class=SensorDeviceClass.WIND_SPEED, device_class=SensorDeviceClass.WIND_SPEED,
entity_registry_enabled_default=False, entity_registry_enabled_default=False,