mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
parent
d68ada74cc
commit
78a49eb9e8
@ -137,7 +137,7 @@ class PowerWallBackupReserveSensor(PowerWallEntity, SensorEntity):
|
||||
class PowerWallEnergyDirectionSensor(PowerWallEntity, SensorEntity):
|
||||
"""Representation of an Powerwall Direction Energy sensor."""
|
||||
|
||||
_attr_state_class = SensorStateClass.TOTAL_INCREASING
|
||||
_attr_state_class = SensorStateClass.TOTAL
|
||||
_attr_native_unit_of_measurement = ENERGY_KILO_WATT_HOUR
|
||||
_attr_device_class = SensorDeviceClass.ENERGY
|
||||
|
||||
@ -183,7 +183,7 @@ class PowerWallExportSensor(PowerWallEnergyDirectionSensor):
|
||||
@property
|
||||
def native_value(self) -> float:
|
||||
"""Get the current value in kWh."""
|
||||
return abs(self.meter.get_energy_exported())
|
||||
return self.meter.get_energy_exported()
|
||||
|
||||
|
||||
class PowerWallImportSensor(PowerWallEnergyDirectionSensor):
|
||||
@ -200,4 +200,4 @@ class PowerWallImportSensor(PowerWallEnergyDirectionSensor):
|
||||
@property
|
||||
def native_value(self) -> float:
|
||||
"""Get the current value in kWh."""
|
||||
return abs(self.meter.get_energy_imported())
|
||||
return self.meter.get_energy_imported()
|
||||
|
Loading…
x
Reference in New Issue
Block a user