Changed SensorDeviceClass to POWER

This commit is contained in:
Roger Gonzalez 2023-09-23 22:04:01 -03:00
parent f2428dd2f9
commit 2210a3ac32
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6

View File

@ -49,13 +49,11 @@ class UTESensor(SensorEntity):
_attr_name = "UTE Current power usage" _attr_name = "UTE Current power usage"
_attr_icon = "lightning-bolt" _attr_icon = "lightning-bolt"
_attr_native_unit_of_measurement = UnitOfPower.WATT _attr_native_unit_of_measurement = UnitOfPower.WATT
_attr_device_class = SensorDeviceClass.ENERGY _attr_device_class = SensorDeviceClass.POWER
def __init__(self, client: UTEClient): def __init__(self, client: UTEClient):
super().__init__() super().__init__()
self.client = client self.client = client
self._state = None
self._available = True
self._name = "Current energy usage" self._name = "Current energy usage"
def update(self): def update(self):