You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# A REST data source (givtcp_rest) is configured but hasn't returned anything this
1497
+
# cycle - genuinely transient (a fetch hiccup, or before the first poll on a fresh
1498
+
# start, e.g. GivEnergy cloud "no devices"), so fall through to the same safe-defaults/
1499
+
# retry-next-update handling below as a configured-but-currently-unusable value,
1500
+
# rather than crashing the whole plan for something that should resolve itself.
1501
+
charge_start_time=None
1502
+
charge_end_time=None
1495
1503
else:
1496
-
self.log("Error: Inverter {} unable to read charge window time as neither REST, charge_start_time or charge_start_hour are set".format(self.id))
1497
-
self.base.record_status("Error: Inverter {} unable to read charge window time as neither REST, charge_start_time or charge_start_hour are set".format(self.id), had_errors=True)
1498
-
raiseValueError
1504
+
# Neither a REST API nor a charge_start_time config value is configured at all - a
1505
+
# permanent setup gap, not something that will resolve on its own. Retrying every
1506
+
# cycle forever would be misleading, so don't pretend to make a plan Predbat can't
1507
+
# actually deliver (maintainer call on #4288/#4179 - see PR review discussion).
1508
+
message="Error: Inverter {} unable to read charge window time as neither REST, charge_start_time or charge_start_hour are set".format(self.id)
1509
+
self.log(message)
1510
+
self.base.record_status(message, had_errors=True)
1511
+
raiseValueError(message)
1499
1512
1500
1513
ifcharge_start_timeisNoneorcharge_end_timeisNone:
1501
1514
self.log("Warn: Inverter {} unable to read charge window time as charge_start_time or charge_end_time is None, will retry next update".format(self.id))
0 commit comments