Skip to content

Commit

Permalink
Merge pull request #165 from vincentwolsink/consumption_can_be_negative
Browse files Browse the repository at this point in the history
Consumption counters can be negative in certain configurations
  • Loading branch information
vincentwolsink authored Oct 2, 2024
2 parents 6fa8781 + 3c930b8 commit 7c87194
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/enphase_envoy/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ def get_model_name(model, hardware_id):
key="daily_consumption",
name="Today's Energy Consumption",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
state_class=SensorStateClass.TOTAL,
device_class=SensorDeviceClass.ENERGY,
suggested_display_precision=0,
),
SensorEntityDescription(
key="lifetime_consumption",
name="Lifetime Energy Consumption",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
state_class=SensorStateClass.TOTAL,
device_class=SensorDeviceClass.ENERGY,
suggested_display_precision=0,
),
Expand Down Expand Up @@ -385,15 +385,15 @@ def get_model_name(model, hardware_id):
key=f"daily_consumption_{phase}",
name=f"Today's Energy Consumption {phase.upper()}",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
state_class=SensorStateClass.TOTAL,
device_class=SensorDeviceClass.ENERGY,
suggested_display_precision=0,
),
SensorEntityDescription(
key=f"lifetime_consumption_{phase}",
name=f"Lifetime Energy Consumption {phase.upper()}",
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
state_class=SensorStateClass.TOTAL,
device_class=SensorDeviceClass.ENERGY,
suggested_display_precision=0,
),
Expand Down

0 comments on commit 7c87194

Please sign in to comment.