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
fix(backup): use typed client helpers for fetch/restore
HomeAssistantClient doesn't expose a generic client.get(path) method —
the convention is to call the typed helpers (get_automation_config,
upsert_script_config, etc.). My initial fetcher path tried
client.get(...) which raised AttributeError on every call; the
decorator's best-effort exception handler swallowed the error and
returned None, so no snapshot was written.
Switch automation/script/scene fetchers to the existing typed helpers
(get_automation_config, get_script_config, get_scene_config) which
handle id resolution and unwrap the response envelope identically to
how ha_config_set_<domain> itself fetches state. Restore similarly
routes through upsert_automation_config / upsert_script_config /
upsert_scene_config — note the script/scene signatures take
(config, id) not (id, config).
Other domains (helpers, dashboards, labels, etc.) use WebSocket so were
unaffected; only the REST-fetched domains needed this fix.
The remaining _rest_get_or_none / _rest_post helpers are kept for
domains without typed wrappers; they now call client._request directly
(public 'get' doesn't exist).
0 commit comments