Handle the new version of HydroQuebec website (#10682)

* Handle the new version of HydroQuebec website

* Update requirements_all.txt
This commit is contained in:
Thibault Cohen 2017-11-20 12:02:05 -05:00 committed by Martin Hjelmare
parent 857d6b5b49
commit df37cb11fa
2 changed files with 4 additions and 3 deletions

View file

@ -21,7 +21,7 @@ from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle from homeassistant.util import Throttle
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['pyhydroquebec==1.2.0'] REQUIREMENTS = ['pyhydroquebec==1.3.1']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -34,6 +34,7 @@ DEFAULT_NAME = 'HydroQuebec'
REQUESTS_TIMEOUT = 15 REQUESTS_TIMEOUT = 15
MIN_TIME_BETWEEN_UPDATES = timedelta(hours=1) MIN_TIME_BETWEEN_UPDATES = timedelta(hours=1)
SCAN_INTERVAL = timedelta(hours=1)
SENSOR_TYPES = { SENSOR_TYPES = {
'balance': 'balance':
@ -115,7 +116,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
for variable in config[CONF_MONITORED_VARIABLES]: for variable in config[CONF_MONITORED_VARIABLES]:
sensors.append(HydroQuebecSensor(hydroquebec_data, variable, name)) sensors.append(HydroQuebecSensor(hydroquebec_data, variable, name))
add_devices(sensors, True) add_devices(sensors)
class HydroQuebecSensor(Entity): class HydroQuebecSensor(Entity):

View file

@ -677,7 +677,7 @@ pyhik==0.1.4
pyhomematic==0.1.34 pyhomematic==0.1.34
# homeassistant.components.sensor.hydroquebec # homeassistant.components.sensor.hydroquebec
pyhydroquebec==1.2.0 pyhydroquebec==1.3.1
# homeassistant.components.device_tracker.icloud # homeassistant.components.device_tracker.icloud
pyicloud==0.9.1 pyicloud==0.9.1