1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-08 17:49:37 +01:00

Add battery percentage sensor to weatherflow (#161200)

This commit is contained in:
Peter Kolbus
2026-02-15 04:19:02 -05:00
committed by GitHub
parent a9495f61a0
commit 43988bf0f5
@@ -125,6 +125,14 @@ SENSORS: tuple[WeatherFlowSensorEntityDescription, ...] = (
state_class=SensorStateClass.MEASUREMENT,
raw_data_conv_fn=lambda raw_data: raw_data.magnitude,
),
WeatherFlowSensorEntityDescription(
key="battery_percent",
native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.BATTERY,
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.MEASUREMENT,
raw_data_conv_fn=lambda raw_data: raw_data.magnitude,
),
WeatherFlowSensorEntityDescription(
key="illuminance",
native_unit_of_measurement=LIGHT_LUX,