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
{{ message }}
Repository navigation
bugs in get_idle_periods, with suggested fixes #122
Sorry for not sending a PR, not working on a computer set up for git etc.
_e3dc.py line 462: if idlePeriodsRaw[0] != RscpTag.EMS_GET_IDLE_PERIODS:
Looks like the first value in idlePeriodsRaw can be a string, not just the enum. This breaks the code even when the device replies correctly.
This works and should catch all variations: if getRscpTag(idlePeriodsRaw[0]) != RscpTag.EMS_GET_IDLE_PERIODS:
_e3dc.py lines 466-467: "idleCharge": [] * 7, "idleDischarge": [] * 7,
This can not work, []*7 is still just []. You need something in there to create a list of that size, e.g.: [None] * 7
Without this the assignments on lines 489/491 always throw exceptions.
Activity