Clean up ssl usage (#33960)
* Clean up ssl usage * Revert config[CONF_SSL] from sonarr, radarr and mfi
This commit is contained in:
parent
cfef8ee961
commit
8198970af9
23 changed files with 44 additions and 55 deletions
|
@ -51,12 +51,12 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
"""Set up the pyLoad sensors."""
|
||||
host = config.get(CONF_HOST)
|
||||
port = config.get(CONF_PORT)
|
||||
ssl = "s" if config.get(CONF_SSL) else ""
|
||||
protocol = "https" if config[CONF_SSL] else "http"
|
||||
name = config.get(CONF_NAME)
|
||||
username = config.get(CONF_USERNAME)
|
||||
password = config.get(CONF_PASSWORD)
|
||||
monitored_types = config.get(CONF_MONITORED_VARIABLES)
|
||||
url = f"http{ssl}://{host}:{port}/api/"
|
||||
url = f"{protocol}://{host}:{port}/api/"
|
||||
|
||||
try:
|
||||
pyloadapi = PyLoadAPI(api_url=url, username=username, password=password)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue