Clean up ssl usage (#33960)

* Clean up ssl usage

* Revert config[CONF_SSL] from sonarr, radarr and mfi
This commit is contained in:
springstan 2020-04-10 22:01:57 +02:00 committed by GitHub
parent cfef8ee961
commit 8198970af9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 44 additions and 55 deletions

View file

@ -52,13 +52,13 @@ SENSOR_TYPES = {
}
ENDPOINTS = {
"diskspace": "http{0}://{1}:{2}/{3}api/diskspace",
"queue": "http{0}://{1}:{2}/{3}api/queue",
"upcoming": "http{0}://{1}:{2}/{3}api/calendar?start={4}&end={5}",
"wanted": "http{0}://{1}:{2}/{3}api/wanted/missing",
"series": "http{0}://{1}:{2}/{3}api/series",
"commands": "http{0}://{1}:{2}/{3}api/command",
"status": "http{0}://{1}:{2}/{3}api/system/status",
"diskspace": "{0}://{1}:{2}/{3}api/diskspace",
"queue": "{0}://{1}:{2}/{3}api/queue",
"upcoming": "{0}://{1}:{2}/{3}api/calendar?start={4}&end={5}",
"wanted": "{0}://{1}:{2}/{3}api/wanted/missing",
"series": "{0}://{1}:{2}/{3}api/series",
"commands": "{0}://{1}:{2}/{3}api/command",
"status": "{0}://{1}:{2}/{3}api/system/status",
}
# Support to Yottabytes for the future, why not
@ -111,7 +111,7 @@ class SonarrSensor(Entity):
self.apikey = conf.get(CONF_API_KEY)
self.included = conf.get(CONF_INCLUDED)
self.days = int(conf.get(CONF_DAYS))
self.ssl = "s" if conf.get(CONF_SSL) else ""
self.ssl = "https" if conf.get(CONF_SSL) else "http"
self._state = None
self.data = []
self._tz = timezone(str(hass.config.time_zone))