Merge pull request #1 from hectorzin/hectorzin-patch-1

bug: unit of measurament
This commit is contained in:
Héctor Martínez 2024-12-23 19:36:17 +01:00 committed by GitHub
commit b41ad4c8b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,7 @@ from homeassistant.const import (
UnitOfEnergy,
UnitOfVolume,
UnitOfMass,
UnitOfPower,
UnitOfTime,
UnitOfTemperature,
)
@ -83,7 +84,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
name="Current Electricity Used",
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
native_unit_of_measurement=UnitOfPower.WATT,
icon="mdi:lightning-bolt",
translation_key="energy_current",
),