mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Fix lovelace save (#19162)
This commit is contained in:
parent
fdea9cb426
commit
da338f2c1a
@ -101,8 +101,8 @@ class LovelaceStorage:
|
|||||||
|
|
||||||
async def async_save(self, config):
|
async def async_save(self, config):
|
||||||
"""Save config."""
|
"""Save config."""
|
||||||
self._data = {'config': config}
|
self._data['config'] = config
|
||||||
await self._store.async_save(config)
|
await self._store.async_save(self._data)
|
||||||
|
|
||||||
|
|
||||||
class LovelaceYAML:
|
class LovelaceYAML:
|
||||||
|
@ -34,7 +34,7 @@ async def test_lovelace_from_storage(hass, hass_ws_client, hass_storage):
|
|||||||
response = await client.receive_json()
|
response = await client.receive_json()
|
||||||
assert response['success']
|
assert response['success']
|
||||||
assert hass_storage[lovelace.STORAGE_KEY]['data'] == {
|
assert hass_storage[lovelace.STORAGE_KEY]['data'] == {
|
||||||
'yo': 'hello'
|
'config': {'yo': 'hello'}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load new config
|
# Load new config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user