Fix lovelace save (#19162)

This commit is contained in:
Paulus Schoutsen 2018-12-10 12:25:08 +01:00 committed by GitHub
parent fdea9cb426
commit da338f2c1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -101,8 +101,8 @@ class LovelaceStorage:
async def async_save(self, config):
"""Save config."""
self._data = {'config': config}
await self._store.async_save(config)
self._data['config'] = config
await self._store.async_save(self._data)
class LovelaceYAML:

View File

@ -34,7 +34,7 @@ async def test_lovelace_from_storage(hass, hass_ws_client, hass_storage):
response = await client.receive_json()
assert response['success']
assert hass_storage[lovelace.STORAGE_KEY]['data'] == {
'yo': 'hello'
'config': {'yo': 'hello'}
}
# Load new config