hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, deregister_port)
except Exception as ex:
_LOGGER.error("UPnP failed to configure port mapping: %s", str(ex))
hass.components.persistent_notification.create(
"<b>ERROR: tcp port {} is already mapped in your router."
"</b><br />Please disable port_mapping in the <i>upnp</i> "
After Change
external, "TCP", host, internal, "Home Assistant", "")
registered.append(external)
except Exception:
_LOGGER.exception("UPnP failed to configure port mapping for %s",
external)
hass.components.persistent_notification.create(
"<b>ERROR: tcp port {} is already mapped in your router."
"</b><br />Please disable port_mapping in the <i>upnp</i> "
"configuration section.<br />"