Make devolo home control more robust against connection losts (#48328)

This commit is contained in:
Guido Schmitz 2021-03-30 07:08:08 +02:00 committed by GitHub
parent 984fb12fa4
commit 2fbe352ad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 15 deletions

View File

@ -49,7 +49,7 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool
)
)
)
except (ConnectionError, GatewayOfflineError) as err:
except GatewayOfflineError as err:
raise ConfigEntryNotReady from err
for platform in PLATFORMS:

View File

@ -2,7 +2,7 @@
"domain": "devolo_home_control",
"name": "devolo Home Control",
"documentation": "https://www.home-assistant.io/integrations/devolo_home_control",
"requirements": ["devolo-home-control-api==0.17.0"],
"requirements": ["devolo-home-control-api==0.17.1"],
"after_dependencies": ["zeroconf"],
"config_flow": true,
"codeowners": ["@2Fake", "@Shutgun"],

View File

@ -479,7 +479,7 @@ deluge-client==1.7.1
denonavr==0.9.10
# homeassistant.components.devolo_home_control
devolo-home-control-api==0.17.0
devolo-home-control-api==0.17.1
# homeassistant.components.directv
directv==0.4.0

View File

@ -261,7 +261,7 @@ defusedxml==0.6.0
denonavr==0.9.10
# homeassistant.components.devolo_home_control
devolo-home-control-api==0.17.0
devolo-home-control-api==0.17.1
# homeassistant.components.directv
directv==0.4.0

View File

@ -39,17 +39,6 @@ async def test_setup_entry_maintenance(hass: HomeAssistant):
assert entry.state == ENTRY_STATE_SETUP_RETRY
async def test_setup_connection_error(hass: HomeAssistant):
"""Test setup entry fails on connection error."""
entry = configure_integration(hass)
with patch(
"homeassistant.components.devolo_home_control.HomeControl",
side_effect=ConnectionError,
):
await hass.config_entries.async_setup(entry.entry_id)
assert entry.state == ENTRY_STATE_SETUP_RETRY
async def test_setup_gateway_offline(hass: HomeAssistant):
"""Test setup entry fails on gateway offline."""
entry = configure_integration(hass)