mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix metoffice visibility range sensor device class (#97763)
* Fix for issue #97694 Issue #97694 points out that the visibility range is a string with a band of distances, not a single value, which is causing issues for front end components. Removed the device class to leave as an informational string value. * Removed *all* empty device_class statements * Missed an empty device_class :(
This commit is contained in:
parent
41eca41638
commit
b5e23ee650
@ -51,14 +51,12 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
SensorEntityDescription(
|
||||
key="name",
|
||||
name="Station name",
|
||||
device_class=None,
|
||||
icon="mdi:label-outline",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="weather",
|
||||
name="Weather",
|
||||
device_class=None,
|
||||
icon="mdi:weather-sunny", # but will adapt to current conditions
|
||||
entity_registry_enabled_default=True,
|
||||
),
|
||||
@ -107,7 +105,6 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
SensorEntityDescription(
|
||||
key="visibility",
|
||||
name="Visibility",
|
||||
device_class=None,
|
||||
icon="mdi:eye",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
@ -115,14 +112,12 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
key="visibility_distance",
|
||||
name="Visibility distance",
|
||||
native_unit_of_measurement=UnitOfLength.KILOMETERS,
|
||||
device_class=SensorDeviceClass.DISTANCE,
|
||||
icon="mdi:eye",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="uv",
|
||||
name="UV index",
|
||||
device_class=None,
|
||||
native_unit_of_measurement=UV_INDEX,
|
||||
icon="mdi:weather-sunny-alert",
|
||||
entity_registry_enabled_default=True,
|
||||
@ -130,7 +125,6 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
SensorEntityDescription(
|
||||
key="precipitation",
|
||||
name="Probability of precipitation",
|
||||
device_class=None,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:weather-rainy",
|
||||
entity_registry_enabled_default=True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user