Fix issue when data is None (#53875)

This commit is contained in:
Joakim Sørensen 2021-08-02 19:35:11 +02:00 committed by GitHub
parent 3bf06de363
commit c3d623a37e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -30,6 +30,7 @@ async def test_get_preferences_no_data(hass, hass_ws_client) -> None:
async def test_get_preferences_default(hass, hass_ws_client, hass_storage) -> None:
"""Test we get preferences."""
assert not await is_configured(hass)
manager = await data.async_get_manager(hass)
manager.data = data.EnergyManager.default_preferences()
client = await hass_ws_client(hass)