mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Fix incorrect handling of hass.data in WattTime setup (#56971)
This commit is contained in:
parent
6c2a18c3e5
commit
0e1630e46d
@ -27,7 +27,8 @@ PLATFORMS: list[str] = ["sensor"]
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Set up WattTime from a config entry."""
|
||||
hass.data.setdefault(DOMAIN, {entry.entry_id: {DATA_COORDINATOR: {}}})
|
||||
hass.data.setdefault(DOMAIN, {})
|
||||
hass.data[DOMAIN][entry.entry_id] = {}
|
||||
|
||||
session = aiohttp_client.async_get_clientsession(hass)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user