From 1ce81f89afcd4ccae31509f58bfae684b7099133 Mon Sep 17 00:00:00 2001 From: Robbert van den Berg <4473594+Rijswijker@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:07:19 +0200 Subject: [PATCH] Update sensor.py Add voltage sensor --- homeassistant/components/loqed/sensor.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/homeassistant/components/loqed/sensor.py b/homeassistant/components/loqed/sensor.py index 1d4595db8e954..43ea8a1401ba0 100644 --- a/homeassistant/components/loqed/sensor.py +++ b/homeassistant/components/loqed/sensor.py @@ -13,6 +13,7 @@ PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT, EntityCategory, + UnitOfElectricPotential, ) from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -38,6 +39,13 @@ entity_category=EntityCategory.DIAGNOSTIC, native_unit_of_measurement=PERCENTAGE, ), + SensorEntityDescription( + key="battery_voltage", + device_class=SensorDeviceClass.VOLTAGE, + state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, + native_unit_of_measurement=UnitOfElectricPotential.VOLT, + ), )