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:
Colby Rome 2019-03-11 00:26:19 -04:00 committed by Rohan Kapoor
parent 429bbc05dc
commit 29f01fb14e
2 changed files with 7 additions and 4 deletions

View file

@ -11,10 +11,10 @@ import voluptuous as vol
from homeassistant.components.device_tracker import (DOMAIN, PLATFORM_SCHEMA,
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
REQUIREMENTS = ['quantum-gateway==0.0.3']
REQUIREMENTS = ['quantum-gateway==0.0.5']
_LOGGER = logging.getLogger(__name__)
@ -22,6 +22,7 @@ DEFAULT_HOST = 'myfiosgateway.com'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
vol.Optional(CONF_SSL, default=True): cv.boolean,
vol.Required(CONF_PASSWORD): cv.string
})
@ -42,10 +43,12 @@ class QuantumGatewayDeviceScanner(DeviceScanner):
self.host = config[CONF_HOST]
self.password = config[CONF_PASSWORD]
self.use_https = config[CONF_SSL]
_LOGGER.debug('Initializing')
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
except RequestException:
self.success_init = False

View file

@ -1478,7 +1478,7 @@ pyzbar==0.1.7
qnapstats==0.2.7
# homeassistant.components.device_tracker.quantum_gateway
quantum-gateway==0.0.3
quantum-gateway==0.0.5
# homeassistant.components.rachio
rachiopy==0.1.3