From df37cb11faae28a3f288682147a68aa7dc3efe7c Mon Sep 17 00:00:00 2001 From: Thibault Cohen Date: Mon, 20 Nov 2017 12:02:05 -0500 Subject: [PATCH] Handle the new version of HydroQuebec website (#10682) * Handle the new version of HydroQuebec website * Update requirements_all.txt --- homeassistant/components/sensor/hydroquebec.py | 5 +++-- requirements_all.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/sensor/hydroquebec.py b/homeassistant/components/sensor/hydroquebec.py index 884f101c033..d857ce57fce 100644 --- a/homeassistant/components/sensor/hydroquebec.py +++ b/homeassistant/components/sensor/hydroquebec.py @@ -21,7 +21,7 @@ from homeassistant.helpers.entity import Entity from homeassistant.util import Throttle import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['pyhydroquebec==1.2.0'] +REQUIREMENTS = ['pyhydroquebec==1.3.1'] _LOGGER = logging.getLogger(__name__) @@ -34,6 +34,7 @@ DEFAULT_NAME = 'HydroQuebec' REQUESTS_TIMEOUT = 15 MIN_TIME_BETWEEN_UPDATES = timedelta(hours=1) +SCAN_INTERVAL = timedelta(hours=1) SENSOR_TYPES = { 'balance': @@ -115,7 +116,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): for variable in config[CONF_MONITORED_VARIABLES]: sensors.append(HydroQuebecSensor(hydroquebec_data, variable, name)) - add_devices(sensors, True) + add_devices(sensors) class HydroQuebecSensor(Entity): diff --git a/requirements_all.txt b/requirements_all.txt index 520848166d0..a8718ebe5b7 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -677,7 +677,7 @@ pyhik==0.1.4 pyhomematic==0.1.34 # homeassistant.components.sensor.hydroquebec -pyhydroquebec==1.2.0 +pyhydroquebec==1.3.1 # homeassistant.components.device_tracker.icloud pyicloud==0.9.1