-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle the new version of HydroQuebec website #10682
Conversation
09e6c49
to
4283b2f
Compare
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the update
call useless?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just to speed up the startup of hass, the update can takes 10-20 seconds, and it's not needed to create sensors component in hass. So sensors will be updated later after the startup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
* Handle the new version of HydroQuebec website * Update requirements_all.txt
@@ -34,6 +34,7 @@ | |||
|
|||
REQUESTS_TIMEOUT = 15 | |||
MIN_TIME_BETWEEN_UPDATES = timedelta(hours=1) | |||
SCAN_INTERVAL = timedelta(hours=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add a force update or allow us to change the update interval?
If you need help please use our help channels: Merged PRs should not be used for support or bug reports. Thanks! |
Description:
HydroQuébec updated their website, this patch update the hydroquebec component to use the last version of pyhydroquebec
Also, this patch disabled the update on startup (this is useless) and set the default scan interval to 1 hour
Please merge also in the 0.58.1 (if this version is planned, Thanks !)
Checklist:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.