Skip to content

Commit

Permalink
Merge pull request #25 from ProudElm/12-lifetime-energy-sensor-fluctu…
Browse files Browse the repository at this point in the history
…ates

Fixed lifetime energy sensor changing value
  • Loading branch information
ProudElm authored Feb 7, 2023
2 parents 92be15a + 2e23e36 commit bbbc4b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/solaredgeoptimizers/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ def _handle_coordinator_update(self) -> None:
):
self._attr_native_value = item.lifetime_energy
break
else:
self._attr_native_value = self._attr_native_value
elif self._sensor_type is SENSOR_TYPE_LASTMEASUREMENT:
self._attr_native_value = item.lastmeasurement
break
Expand Down

0 comments on commit bbbc4b4

Please sign in to comment.