Fix saved layouts silently dropping weather widget settings
LAYOUT_CONFIG_FIELDS never had a "weather" entry, so saving a layout captured an empty config for any weather widget -- applying it back (including via hold-to-cycle) reset mode/provider/city/units/etc to defaults instead of restoring what was configured.
This commit is contained in:
@@ -63,6 +63,10 @@ LAYOUT_CONFIG_FIELDS: dict[str, tuple[str, ...]] = {
|
||||
"text": ("content", "font_size", "font_family", "align", "background_color"),
|
||||
"whiteboard": ("user_id", "url"),
|
||||
"battery": ("mode",),
|
||||
"weather": (
|
||||
"mode", "provider", "units", "city_label", "city_latitude", "city_longitude",
|
||||
"hourly_interval_hours", "daily_days", "cities",
|
||||
),
|
||||
}
|
||||
|
||||
# widget_type -> (FrameCalendar|FrameTaskList model, SavedLayoutSource.kind)
|
||||
|
||||
Reference in New Issue
Block a user