mirror of
https://github.com/home-assistant/core.git
synced 2026-04-19 16:09:06 +02:00
Pop key when discovery is removed, fix typo
This commit is contained in:
@@ -574,8 +574,8 @@ async def async_start( # noqa: C901
|
||||
else:
|
||||
if (
|
||||
(
|
||||
entity_hash := mqtt_data.discovery_discovered_and_disabled.get(
|
||||
discovery_hash
|
||||
entity_hash := mqtt_data.discovery_discovered_and_disabled.pop(
|
||||
discovery_hash, None
|
||||
)
|
||||
)
|
||||
and (entity_registry := er.async_get(hass))
|
||||
|
||||
@@ -578,7 +578,7 @@ async def test_registry_enable_not_enabled_by_default_entity(
|
||||
assert device_registry.async_get(device_id) is not None
|
||||
|
||||
# Remove the entity and device
|
||||
# At this stage no entry existsed during the initization
|
||||
# At this stage no entry existed during the initialization
|
||||
async_fire_mqtt_message(hass, discovery_topic, "")
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
entry = entity_registry.async_get("sensor.test")
|
||||
|
||||
Reference in New Issue
Block a user