Skip to content

Commit

Permalink
Close connection before raising ConfigEntryNotReady
Browse files Browse the repository at this point in the history
  • Loading branch information
shenxn committed Apr 8, 2021
1 parent 6d93aa4 commit 28ee817
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/dyson_local/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def setup_entry(host: str, is_discovery: bool = True) -> bool:
host,
)
return
device.disconnect()
raise ConfigEntryNotReady
hass.data[DOMAIN][DATA_DEVICES][entry.entry_id] = device
hass.data[DOMAIN][DATA_COORDINATORS][entry.entry_id] = coordinator
Expand Down

0 comments on commit 28ee817

Please sign in to comment.