Skip to content

Commit

Permalink
Fix lovelace save (#19162)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob authored Dec 10, 2018
1 parent fdea9cb commit da338f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/lovelace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ async def async_load(self, force):

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:
Expand Down
2 changes: 1 addition & 1 deletion tests/components/lovelace/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da338f2

Please sign in to comment.