mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Enable statistics for WLED WiFi RSSI/Signal sensors (#76789)
This commit is contained in:
parent
8f0f734c28
commit
f443edfef4
@ -96,6 +96,7 @@ SENSORS: tuple[WLEDSensorEntityDescription, ...] = (
|
|||||||
name="Wi-Fi signal",
|
name="Wi-Fi signal",
|
||||||
icon="mdi:wifi",
|
icon="mdi:wifi",
|
||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
value_fn=lambda device: device.info.wifi.signal if device.info.wifi else None,
|
value_fn=lambda device: device.info.wifi.signal if device.info.wifi else None,
|
||||||
@ -105,6 +106,7 @@ SENSORS: tuple[WLEDSensorEntityDescription, ...] = (
|
|||||||
name="Wi-Fi RSSI",
|
name="Wi-Fi RSSI",
|
||||||
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
value_fn=lambda device: device.info.wifi.rssi if device.info.wifi else None,
|
value_fn=lambda device: device.info.wifi.rssi if device.info.wifi else None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user