From dd232a35072a68ec77d484f05872897ea82eb9f0 Mon Sep 17 00:00:00 2001 From: Ziv <16467659+ziv1234@users.noreply.github.com> Date: Sun, 29 Mar 2020 00:19:43 +0300 Subject: [PATCH] Fix uncaught exceptions in dynalite (#33374) --- homeassistant/components/dynalite/__init__.py | 2 +- tests/components/dynalite/test_bridge.py | 6 ++++++ tests/ignore_uncaught_exceptions.py | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/dynalite/__init__.py b/homeassistant/components/dynalite/__init__.py index e27bdfbb142..973d09a384f 100755 --- a/homeassistant/components/dynalite/__init__.py +++ b/homeassistant/components/dynalite/__init__.py @@ -141,7 +141,7 @@ async def async_entry_changed(hass, entry): """Reload entry since the data has changed.""" LOGGER.debug("Reconfiguring entry %s", entry.data) bridge = hass.data[DOMAIN][entry.entry_id] - await bridge.reload_config(entry.data) + bridge.reload_config(entry.data) LOGGER.debug("Reconfiguring entry finished %s", entry.data) diff --git a/tests/components/dynalite/test_bridge.py b/tests/components/dynalite/test_bridge.py index ee6baaa7561..97759e96b69 100755 --- a/tests/components/dynalite/test_bridge.py +++ b/tests/components/dynalite/test_bridge.py @@ -55,8 +55,11 @@ async def test_add_devices_then_register(hass): device1 = Mock() device1.category = "light" device1.name = "NAME" + device1.unique_id = "unique1" device2 = Mock() device2.category = "switch" + device2.name = "NAME2" + device2.unique_id = "unique2" new_device_func([device1, device2]) await hass.async_block_till_done() assert hass.states.get("light.name") @@ -78,8 +81,11 @@ async def test_register_then_add_devices(hass): device1 = Mock() device1.category = "light" device1.name = "NAME" + device1.unique_id = "unique1" device2 = Mock() device2.category = "switch" + device2.name = "NAME2" + device2.unique_id = "unique2" new_device_func([device1, device2]) await hass.async_block_till_done() assert hass.states.get("light.name") diff --git a/tests/ignore_uncaught_exceptions.py b/tests/ignore_uncaught_exceptions.py index b6580b63d0e..16bd736cef6 100644 --- a/tests/ignore_uncaught_exceptions.py +++ b/tests/ignore_uncaught_exceptions.py @@ -21,9 +21,6 @@ IGNORE_UNCAUGHT_EXCEPTIONS = [ ("tests.components.dsmr.test_sensor", "test_belgian_meter_low"), ("tests.components.dsmr.test_sensor", "test_tcp"), ("tests.components.dsmr.test_sensor", "test_connection_errors_retry"), - ("tests.components.dynalite.test_bridge", "test_add_devices_then_register"), - ("tests.components.dynalite.test_bridge", "test_register_then_add_devices"), - ("tests.components.dynalite.test_config_flow", "test_existing_update"), ("tests.components.dyson.test_air_quality", "test_purecool_aiq_attributes"), ("tests.components.dyson.test_air_quality", "test_purecool_aiq_update_state"), (