Skip to content
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

Merged
merged 2 commits into from
Nov 20, 2017

Conversation

titilambert
Copy link
Contributor

@titilambert titilambert commented Nov 19, 2017

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:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

@@ -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)
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@MartinHjelmare MartinHjelmare added this to the 0.58.1 milestone Nov 20, 2017
@MartinHjelmare MartinHjelmare merged commit df37cb1 into home-assistant:dev Nov 20, 2017
balloob pushed a commit that referenced this pull request Nov 21, 2017
* Handle the new version of HydroQuebec website

* Update requirements_all.txt
@balloob balloob mentioned this pull request Nov 21, 2017
@@ -34,6 +34,7 @@

REQUESTS_TIMEOUT = 15
MIN_TIME_BETWEEN_UPDATES = timedelta(hours=1)
SCAN_INTERVAL = timedelta(hours=1)

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?

@MartinHjelmare
Copy link
Member

If you need help please use our help channels:
https://home-assistant.io/help/#communication-channels

Merged PRs should not be used for support or bug reports. Thanks!

@home-assistant home-assistant locked and limited conversation to collaborators Nov 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants