Skip to content

Commit f3eee8f

Browse files
fix(fox): clamp fdpwr_max at the corrected capacity instead of a fudge margin
Cap at inverter_capacity directly now that capacity_watts() already corrects half-kW deviceTypes - the earlier +999W tolerance was a blunter hack that could let a genuinely bogus fdpwr reading through undetected.
1 parent 3e2b22d commit f3eee8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/predbat/fox.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ async def get_scheduler(self, deviceSN, checkBattery=True):
14941494
# XXX: Fox seems to be have an issue with FD Power max value being too high, cap it at the inverter capacity
14951495
# (inverter_capacity is already corrected for half-kW deviceTypes by capacity_watts())
14961496
if inverter_capacity:
1497-
self.fdpwr_max[deviceSN] = min(inverter_capacity + 999.0, self.fdpwr_max[deviceSN])
1497+
self.fdpwr_max[deviceSN] = min(inverter_capacity, self.fdpwr_max[deviceSN])
14981498

14991499
# Min SOC On grid can change as Predbat writes reserve so this must be the real min
15001500
self.fdsoc_min[deviceSN] = result.get("properties", {}).get("fdsoc", {}).get("range", {}).get("min", 10)

0 commit comments

Comments
 (0)