Skip to content

Commit

Permalink
Fix Key Error
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Mamontov committed Mar 20, 2021
1 parent d088bbd commit a7f4cf7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/miwifi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ async def async_setup(hass: HomeAssistant, config: dict) -> bool:
if DOMAIN not in config:
return success

hass.data.setdefault(DOMAIN, {})

for router in config[DOMAIN]:
hass.data[DOMAIN][router[CONF_IP_ADDRESS]] = router

Expand Down

0 comments on commit a7f4cf7

Please sign in to comment.