Skip to content

Commit 9d96930

Browse files
fix(fox): bump settings cache version to force-refresh fdpwr_max on upgrade
battery_rate_max is only recomputed when get_scheduler() actually makes a live call, which is otherwise gated to once an hour - so a customer upgrading to the capacity_watts() fix kept the old, wrongly-clamped fdpwr_max from their persisted cache while inverter_capacity (recomputed live every publish cycle from cached device_detail) updated immediately. Bumping FOX_SETTINGS_CACHE_VERSION triggers the existing self-heal path that forces one scheduler refresh regardless of cache age.
1 parent f00a6c5 commit 9d96930

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
@@ -64,7 +64,7 @@
6464
# range/unit/precision to schedule-derived settings) so a persisted cache from before that
6565
# change is detected as stale and forces one settings/scheduler refresh regardless of age,
6666
# instead of being reused as-is - potentially forever, since nothing else would ever correct it.
67-
FOX_SETTINGS_CACHE_VERSION = 2
67+
FOX_SETTINGS_CACHE_VERSION = 3
6868

6969
# Storage cache keys for device data persisted between reboots
7070
FOX_CACHE_KEYS = ["device_list", "device_detail", "battery_charging_time", "device_settings", "device_settings_unavailable", "device_settings_version", "scheduler_state", "device_values", "device_production_month"]

0 commit comments

Comments
 (0)