Delay sync for Google and limit updates to relevant info (#34622)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-04-24 10:49:11 +02:00
1 parent 813e945d86
commit d3bbd9ec65
5 files changed
+69 -21

No files matched your search

@@ -165,10 +165,21 @@ async def test_alexa_entity_registry_sync(hass, mock_cloud_login, cloud_prefs):
"action": "update",
"entity_id": "light.kitchen",
"changes": ["entity_id"],
"old_entity_id": "light.living_room",
},
)
await hass.async_block_till_done()
assert to_update == ["light.kitchen"]
assert to_remove == ["light.living_room"]
with patch_sync_helper() as (to_update, to_remove):
hass.bus.async_fire(
EVENT_ENTITY_REGISTRY_UPDATED,
{"action": "update", "entity_id": "light.kitchen", "changes": ["icon"]},
)
await hass.async_block_till_done()
assert to_update == []
assert to_remove == []