Fix uncaught exceptions in dynalite (#33374)

This commit is contained in:
Ziv 2020-03-29 00:19:43 +03:00 committed by GitHub
parent 03a9e3284c
commit dd232a3507
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View file

@ -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)

View file

@ -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")

View file

@ -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"),
(