Sabnzbd config flow improvments (#70981)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
a9ca774e7e
commit
8883f5482b
7 changed files with 181 additions and 88 deletions
|
@ -70,10 +70,8 @@ class SABnzbdConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
|
||||
async def async_step_import(self, import_data):
|
||||
"""Import sabnzbd config from configuration.yaml."""
|
||||
import_data[CONF_URL] = (
|
||||
("https://" if import_data[CONF_SSL] else "http://")
|
||||
+ import_data[CONF_HOST]
|
||||
+ ":"
|
||||
+ str(import_data[CONF_PORT])
|
||||
)
|
||||
protocol = "https://" if import_data[CONF_SSL] else "http://"
|
||||
import_data[
|
||||
CONF_URL
|
||||
] = f"{protocol}{import_data[CONF_HOST]}:{import_data[CONF_PORT]}"
|
||||
return await self.async_step_user(import_data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue