mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Fix Aurora abb incorrect attr (#58450)
This commit is contained in:
parent
65b19da3ff
commit
2517ba59b5
@ -79,7 +79,7 @@ class AuroraSensor(AuroraDevice, SensorEntity):
|
||||
super().__init__(client, data)
|
||||
if typename == "instantaneouspower":
|
||||
self.type = typename
|
||||
self._attr_unit_of_measurement = POWER_WATT
|
||||
self._attr_native_unit_of_measurement = POWER_WATT
|
||||
self._attr_device_class = DEVICE_CLASS_POWER
|
||||
elif typename == "temperature":
|
||||
self.type = typename
|
||||
@ -101,7 +101,7 @@ class AuroraSensor(AuroraDevice, SensorEntity):
|
||||
if self.type == "instantaneouspower":
|
||||
# read ADC channel 3 (grid power output)
|
||||
power_watts = self.client.measure(3, True)
|
||||
self._attr_state = round(power_watts, 1)
|
||||
self._attr_native_value = round(power_watts, 1)
|
||||
elif self.type == "temperature":
|
||||
temperature_c = self.client.measure(21)
|
||||
self._attr_native_value = round(temperature_c, 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user