Repository navigation
Conversation
Request battery updates once per newly observed plug-in and at most hourly during charging. Bound status polling, tolerate transient status transport failures, and retain passive reads with manufacturer timestamps when refresh fails. Keep the option disabled by default, use a fresh connection for the single command, and preserve the upstream HTTP response test fixture correction.
CI enables global DEBUG logging, so requests_mock logs synthetic vehicle and action URLs that trigger the privacy assertions. Set only its adapter logger to WARNING in the HTTP fixture; caplog restores the level after each test. Real HTTP and module logging remain covered.
| user_id: Optional[str] = field(default=None, repr=False) | ||
| password: Optional[str] = field(default=None, repr=False) | ||
| vin: Optional[str] = field(default=None, repr=False) | ||
| refresh_while_charging: bool = False |
There was a problem hiding this comment.
Muss das einstellbar sein?
Wenn es bei allen Fahrzeugen funktioniert, ist es besser, es nicht einstellbar zu machen und immer anzuwenden, dann hat man ein stabileren SoC.
There was a problem hiding this comment.
Ich brauch das nicht einstellbar. Der ursprüngliche Gedanke war, dass es ggf. zu viele Abfragen bei der NissanCloud werden. Aber soo oft und lang lädt man auch nicht, dass das überstrapaziert würde - so zumindest die Hoffnung.
Getestet habe ich das nur auf meiner Wallbox und nur mit einem Leaf ZE1, für andere Modelle kann ich es nicht bestätigen.
Ich habe die Option entfernt, die Abfrage ist jetzt immer aktiv: einmal nach jedem neu erkannten Anstecken und während der Ladung höchstens einmal pro Stunde.
In openWB/openwb-ui-settings#1152 entfällt der Schalter, dort ändert sich nur noch der Hinweistext.
Remove the refresh_while_charging option as requested in review. The vehicle is asked for new data once per newly observed plug-in and at most hourly while charging; all other reads stay passive. Failed refreshes still fall back to cached data with its original timestamp.
Summary by Sourcery
Allow Nissan vehicles to request an active battery refresh on plug-in or while charging, while preserving normal cached-data reads when refreshes fail.
New Features:
Bug Fixes:
Enhancements:
Tests:
UI openWB/openwb-ui-settings#1152 (review)