Skip to content

Commit

Permalink
Fix logging bug in Battery capacity workaround case
Browse files Browse the repository at this point in the history
  • Loading branch information
springfall2008 authored Jun 5, 2023
1 parent 3a7ac07 commit ee558c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, base, id=0):
self.soc_max = float(self.rest_data['Invertor_Details']['Battery_Capacity_kWh'])
if abs(self.soc_max - self.nominal_capacity) > 1.0:
# XXX: Weird workaround for battery reporting wrong capacity issue
self.log("WARN: REST data reports Battery Capacity Kwh as {} but nominal indicates {} - using nominal".format(self.soc_max, self.nominal_capacity))
self.base.log("WARN: REST data reports Battery Capacity Kwh as {} but nominal indicates {} - using nominal".format(self.soc_max, self.nominal_capacity))
self.soc_max = self.nominal_capacity
self.soc_max *= self.base.battery_scaling
self.charge_rate_max = self.rest_data['Control']['Battery_Charge_Rate'] / 1000.0 / 60.0
Expand Down

0 comments on commit ee558c9

Please sign in to comment.