Freeze config entry data (#32615)
* Freeze config entry data * Fix mutating entry.data * Fix config entry options tests
This commit is contained in:
parent
3318e65948
commit
d4615fd432
16 changed files with 71 additions and 45 deletions
|
@ -428,8 +428,9 @@ async def smartapp_update(hass: HomeAssistantType, req, resp, app):
|
|||
None,
|
||||
)
|
||||
if entry:
|
||||
entry.data[CONF_REFRESH_TOKEN] = req.refresh_token
|
||||
hass.config_entries.async_update_entry(entry)
|
||||
hass.config_entries.async_update_entry(
|
||||
entry, data={**entry.data, CONF_REFRESH_TOKEN: req.refresh_token}
|
||||
)
|
||||
|
||||
_LOGGER.debug(
|
||||
"Updated SmartApp '%s' under parent app '%s'", req.installed_app_id, app.app_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue