Skip to content

Commit

Permalink
Merge pull request #246 from marcusds/main
Browse files Browse the repository at this point in the history
fix: don't use solar_energy if 0 when it shouldn't be
  • Loading branch information
HAEdwin authored Mar 30, 2024
2 parents 7a1c4bb + 02cefd5 commit 95589db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/apsystems_ecur/APSystemsSocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ def query_ecu(self):
self.close_socket()

data = self.process_inverter_data()
data["today_energy"] = self.today_energy
data["ecu_id"] = self.ecu_id
if self.lifetime_energy != 0:
data["lifetime_energy"] = self.lifetime_energy
data["current_power"] = self.current_power
data["qty_of_inverters"] = self.qty_of_inverters
# apply filter for ECU-R-pro firmware bug where both are zero
if self.qty_of_inverters > 0:
data["qty_of_inverters"] = self.qty_of_inverters
data["today_energy"] = self.today_energy
data["qty_of_online_inverters"] = self.qty_of_online_inverters
return(data)

Expand Down

0 comments on commit 95589db

Please sign in to comment.