Add distance device class to Ecowitt lightning distance sensors (#168995)

This commit is contained in:
Martin
2026-04-24 15:41:51 +02:00
committed by GitHub
parent 8cd2d397d1
commit d849b12bc7
@@ -213,11 +213,13 @@ ECOWITT_SENSORS_MAPPING: Final = {
),
EcoWittSensorTypes.LIGHTNING_DISTANCE_KM: SensorEntityDescription(
key="LIGHTNING_DISTANCE_KM",
device_class=SensorDeviceClass.DISTANCE,
native_unit_of_measurement=UnitOfLength.KILOMETERS,
state_class=SensorStateClass.MEASUREMENT,
),
EcoWittSensorTypes.LIGHTNING_DISTANCE_MILES: SensorEntityDescription(
key="LIGHTNING_DISTANCE_MILES",
device_class=SensorDeviceClass.DISTANCE,
native_unit_of_measurement=UnitOfLength.MILES,
state_class=SensorStateClass.MEASUREMENT,
),