Make DeviceRegistry.async_get_device connections arg optional (#44897)
* Make async_get_device connections Optional, default None * Remove unnecessary async_get_device connections arg usages Some of these were using an incorrect collection type, which didn't cause issues mostly just due to luck.
This commit is contained in:
parent
751ac0b955
commit
2fb3be50ab
57 changed files with 181 additions and 232 deletions
|
@ -43,7 +43,7 @@ async def test_get_triggers(hass, mock_bridge, device_reg):
|
|||
|
||||
# Get triggers for specific tap switch
|
||||
hue_tap_device = device_reg.async_get_device(
|
||||
{(hue.DOMAIN, "00:00:00:00:00:44:23:08")}, connections={}
|
||||
{(hue.DOMAIN, "00:00:00:00:00:44:23:08")}
|
||||
)
|
||||
triggers = await async_get_device_automations(hass, "trigger", hue_tap_device.id)
|
||||
|
||||
|
@ -61,7 +61,7 @@ async def test_get_triggers(hass, mock_bridge, device_reg):
|
|||
|
||||
# Get triggers for specific dimmer switch
|
||||
hue_dimmer_device = device_reg.async_get_device(
|
||||
{(hue.DOMAIN, "00:17:88:01:10:3e:3a:dc")}, connections={}
|
||||
{(hue.DOMAIN, "00:17:88:01:10:3e:3a:dc")}
|
||||
)
|
||||
triggers = await async_get_device_automations(hass, "trigger", hue_dimmer_device.id)
|
||||
|
||||
|
@ -97,7 +97,7 @@ async def test_if_fires_on_state_change(hass, mock_bridge, device_reg, calls):
|
|||
|
||||
# Set an automation with a specific tap switch trigger
|
||||
hue_tap_device = device_reg.async_get_device(
|
||||
{(hue.DOMAIN, "00:00:00:00:00:44:23:08")}, connections={}
|
||||
{(hue.DOMAIN, "00:00:00:00:00:44:23:08")}
|
||||
)
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue