1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-27 06:28:31 +00:00

Cleanup if discovered mqtt switch can't be added (#19721)

* Cleanup if discovered mqtt switch can't be added
This commit is contained in:
emontnemery
2019-01-07 16:57:51 +01:00
committed by GitHub
parent 8b232e7ce6
commit dd75c49796
4 changed files with 53 additions and 8 deletions

View File

@@ -180,6 +180,11 @@ ABBREVIATIONS = {
}
def clear_discovery_hash(hass, discovery_hash):
"""Clear entry in ALREADY_DISCOVERED list."""
del hass.data[ALREADY_DISCOVERED][discovery_hash]
async def async_start(hass: HomeAssistantType, discovery_topic, hass_config,
config_entry=None) -> bool:
"""Initialize of MQTT Discovery."""