Correct deprecated volt units on yalexs_ble sensor (#83738)
This commit is contained in:
parent
f19a1147fe
commit
a65ce7e6c6
1 changed files with 2 additions and 2 deletions
|
@ -14,9 +14,9 @@ from homeassistant.components.sensor import (
|
|||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ELECTRIC_POTENTIAL_VOLT,
|
||||
PERCENTAGE,
|
||||
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
UnitOfElectricPotential,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
|
@ -72,7 +72,7 @@ SENSORS: tuple[YaleXSBLESensorEntityDescription, ...] = (
|
|||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
has_entity_name=True,
|
||||
native_unit_of_measurement=ELECTRIC_POTENTIAL_VOLT,
|
||||
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda state, info, connection: state.battery.voltage
|
||||
if state.battery
|
||||
|
|
Loading…
Add table
Reference in a new issue