Skip to content

Commit ab58dbd

Browse files
Solved issue #30
1 parent aa8f674 commit ab58dbd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

custom_components/uhomeuponor/config_flow.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class UhomeuponorConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
1313
"""Uponor config flow."""
1414
VERSION = 1
1515
# CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
16-
16+
1717
async def async_step_user(self, user_input=None):
1818
errors = {}
1919
if self._async_current_entries():
@@ -25,11 +25,12 @@ async def async_step_user(self, user_input=None):
2525
#if valid:
2626
#title = f"{self.info[CONF_HOST]} - {self.device_id}"
2727
title = f"Uhome Uponor"
28+
prefix = user_input.get(CONF_PREFIX) if user_input.get(CONF_PREFIX) else ""
2829
return self.async_create_entry(
2930
title=title,
3031
data={
3132
"host": user_input[CONF_HOST],
32-
"prefix": user_input[CONF_PREFIX],
33+
"prefix": prefix,
3334
},
3435
)
3536

@@ -42,7 +43,7 @@ async def async_step_user(self, user_input=None):
4243
}
4344
), errors=errors
4445
)
45-
46+
4647
# @staticmethod
4748
# @callback
4849
# def async_get_options_flow(

0 commit comments

Comments
 (0)