mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix tracebacks
This commit is contained in:
parent
c19665fed4
commit
a7a16e4317
@ -89,6 +89,8 @@ class UpnpFlowHandler(data_entry_flow.FlowHandler):
|
|||||||
|
|
||||||
async def async_step_user(self, user_input=None):
|
async def async_step_user(self, user_input=None):
|
||||||
"""Manual set up."""
|
"""Manual set up."""
|
||||||
|
ensure_domain_data(self.hass)
|
||||||
|
|
||||||
# if user input given, handle it
|
# if user input given, handle it
|
||||||
user_input = user_input or {}
|
user_input = user_input or {}
|
||||||
if 'name' in user_input:
|
if 'name' in user_input:
|
||||||
@ -126,10 +128,14 @@ class UpnpFlowHandler(data_entry_flow.FlowHandler):
|
|||||||
|
|
||||||
async def async_step_import(self, import_info):
|
async def async_step_import(self, import_info):
|
||||||
"""Import a new UPnP/IGD as a config entry."""
|
"""Import a new UPnP/IGD as a config entry."""
|
||||||
|
ensure_domain_data(self.hass)
|
||||||
|
|
||||||
return await self._async_save_entry(import_info)
|
return await self._async_save_entry(import_info)
|
||||||
|
|
||||||
async def _async_save_entry(self, import_info):
|
async def _async_save_entry(self, import_info):
|
||||||
"""Store UPNP/IGD as new entry."""
|
"""Store UPNP/IGD as new entry."""
|
||||||
|
ensure_domain_data(self.hass)
|
||||||
|
|
||||||
# ensure we know the host
|
# ensure we know the host
|
||||||
name = import_info['name']
|
name = import_info['name']
|
||||||
discovery_infos = [info
|
discovery_infos = [info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user