Add 'ssl' parameter for FiOS Quantum Gateway and upgrade Pypi (#21669)
* bump pypi version and take 'use_https' parameter * changed to use CONF_SSL
This commit is contained in:
parent
429bbc05dc
commit
29f01fb14e
2 changed files with 7 additions and 4 deletions
|
@ -11,10 +11,10 @@ import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.device_tracker import (DOMAIN, PLATFORM_SCHEMA,
|
from homeassistant.components.device_tracker import (DOMAIN, PLATFORM_SCHEMA,
|
||||||
DeviceScanner)
|
DeviceScanner)
|
||||||
from homeassistant.const import (CONF_HOST, CONF_PASSWORD)
|
from homeassistant.const import (CONF_HOST, CONF_PASSWORD, CONF_SSL)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
REQUIREMENTS = ['quantum-gateway==0.0.3']
|
REQUIREMENTS = ['quantum-gateway==0.0.5']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ DEFAULT_HOST = 'myfiosgateway.com'
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||||
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
|
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
|
||||||
|
vol.Optional(CONF_SSL, default=True): cv.boolean,
|
||||||
vol.Required(CONF_PASSWORD): cv.string
|
vol.Required(CONF_PASSWORD): cv.string
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -42,10 +43,12 @@ class QuantumGatewayDeviceScanner(DeviceScanner):
|
||||||
|
|
||||||
self.host = config[CONF_HOST]
|
self.host = config[CONF_HOST]
|
||||||
self.password = config[CONF_PASSWORD]
|
self.password = config[CONF_PASSWORD]
|
||||||
|
self.use_https = config[CONF_SSL]
|
||||||
_LOGGER.debug('Initializing')
|
_LOGGER.debug('Initializing')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.quantum = QuantumGatewayScanner(self.host, self.password)
|
self.quantum = QuantumGatewayScanner(self.host, self.password,
|
||||||
|
self.use_https)
|
||||||
self.success_init = self.quantum.success_init
|
self.success_init = self.quantum.success_init
|
||||||
except RequestException:
|
except RequestException:
|
||||||
self.success_init = False
|
self.success_init = False
|
||||||
|
|
|
@ -1478,7 +1478,7 @@ pyzbar==0.1.7
|
||||||
qnapstats==0.2.7
|
qnapstats==0.2.7
|
||||||
|
|
||||||
# homeassistant.components.device_tracker.quantum_gateway
|
# homeassistant.components.device_tracker.quantum_gateway
|
||||||
quantum-gateway==0.0.3
|
quantum-gateway==0.0.5
|
||||||
|
|
||||||
# homeassistant.components.rachio
|
# homeassistant.components.rachio
|
||||||
rachiopy==0.1.3
|
rachiopy==0.1.3
|
||||||
|
|
Loading…
Add table
Reference in a new issue