Skip to content

Commit

Permalink
refactor: Device state update method
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Feb 11, 2025
1 parent 1332b68 commit 542074c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/solarman/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def update(self, reinit: bool = False):
if reinit:
self.updated = now
else:
self.updated_interval = now - self.updated
self.updated = now
self.updated, self.updated_interval = now, now - self.updated
self.value = 1

def reevaluate(self) -> int:
Expand Down

0 comments on commit 542074c

Please sign in to comment.