1
0
mirror of https://github.com/elisspace/core.git synced 2026-09-03 14:30:10 +00:00

Partially revert powerwall abs change from #67245 (#67300)

This commit is contained in:
J. Nick Koston
2022-03-01 14:00:48 -10:00
committed by Paulus Schoutsen
parent ee3be011a5
commit d766b17323

View File

@@ -114,7 +114,7 @@ class PowerWallEnergySensor(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
@@ -160,7 +160,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):
@@ -177,4 +177,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()