Library refactorization of deCONZ (#23725)
* Improved sensors * Lib update signalling * Replace reason with changed * Move imports to top of file * Add support for secondary temperature reported by some Xiaomi devices * Bump dependency to v59
This commit is contained in:
1 parent
0ba54ee9b7
commit
31b2f331db
19 files changed
+104
-83
No files matched your search
@@ -43,7 +43,7 @@ async def test_flow_works(hass, aioclient_mock):
|
||||
|
||||
async def test_user_step_bridge_discovery_fails(hass, aioclient_mock):
|
||||
"""Test config flow works when discovery fails."""
|
||||
with patch('pydeconz.utils.async_discovery',
|
||||
with patch('homeassistant.components.deconz.config_flow.async_discovery',
|
||||
side_effect=asyncio.TimeoutError):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
config_flow.DOMAIN,
|
||||
@@ -158,8 +158,9 @@ async def test_link_no_api_key(hass):
|
||||
config_flow.CONF_PORT: 80
|
||||
}
|
||||
|
||||
with patch('pydeconz.utils.async_get_api_key',
|
||||
side_effect=pydeconz.errors.ResponseError):
|
||||
with patch(
|
||||
'homeassistant.components.deconz.config_flow.async_get_api_key',
|
||||
side_effect=pydeconz.errors.ResponseError):
|
||||
result = await flow.async_step_link(user_input={})
|
||||
|
||||
assert result['type'] == 'form'
|
||||
@@ -275,8 +276,9 @@ async def test_create_entry_timeout(hass, aioclient_mock):
|
||||
config_flow.CONF_API_KEY: '1234567890ABCDEF'
|
||||
}
|
||||
|
||||
with patch('pydeconz.utils.async_get_bridgeid',
|
||||
side_effect=asyncio.TimeoutError):
|
||||
with patch(
|
||||
'homeassistant.components.deconz.config_flow.async_get_bridgeid',
|
||||
side_effect=asyncio.TimeoutError):
|
||||
result = await flow._create_entry()
|
||||
|
||||
assert result['type'] == 'abort'
|
||||
|
||||
Reference in new issue
Block a user