Hue: unique ID for groups + remote events (#50748)
This commit is contained in:
parent
c8486879ae
commit
56774a9f63
10 changed files with 76 additions and 39 deletions
|
@ -269,6 +269,10 @@ async def test_groups(hass, mock_bridge):
|
|||
mock_bridge.allow_groups = True
|
||||
mock_bridge.mock_light_responses.append({})
|
||||
mock_bridge.mock_group_responses.append(GROUP_RESPONSE)
|
||||
mock_bridge.api.groups._v2_resources = [
|
||||
{"id_v1": "/groups/1", "id": "group-1-mock-id", "type": "room"},
|
||||
{"id_v1": "/groups/2", "id": "group-2-mock-id", "type": "room"},
|
||||
]
|
||||
|
||||
await setup_bridge(hass, mock_bridge)
|
||||
assert len(mock_bridge.mock_requests) == 2
|
||||
|
@ -285,6 +289,10 @@ async def test_groups(hass, mock_bridge):
|
|||
assert lamp_2 is not None
|
||||
assert lamp_2.state == "on"
|
||||
|
||||
ent_reg = er.async_get(hass)
|
||||
assert ent_reg.async_get("light.group_1").unique_id == "group-1-mock-id"
|
||||
assert ent_reg.async_get("light.group_2").unique_id == "group-2-mock-id"
|
||||
|
||||
|
||||
async def test_new_group_discovered(hass, mock_bridge):
|
||||
"""Test if 2nd update has a new group."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue