Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lovelace save #19162

Merged
merged 1 commit into from
Dec 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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