Skip to content
Merged
Changes from 2 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
5 changes: 2 additions & 3 deletions homeassistant/components/nws/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def base_unique_id(latitude, longitude):

async def async_setup(hass: HomeAssistant, config: dict):
"""Set up the National Weather Service (NWS) component."""
hass.data.setdefault(DOMAIN, {})
return True


Expand Down Expand Up @@ -93,8 +92,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
update_method=nws_data.update_forecast_hourly,
update_interval=DEFAULT_SCAN_INTERVAL,
)

hass.data[DOMAIN][entry.entry_id] = {
nws_data = hass.data.setdefault(DOMAIN, {})
nws_data[entry.entry_id] = {
NWS_DATA: nws_data,
COORDINATOR_OBSERVATION: coordinator_observation,
COORDINATOR_FORECAST: coordinator_forecast,
Expand Down