:vicare: Improve scan_interval (#33294)

This upgrades to PyVicare 0.1.10 which allows to combine multiple
requests into a single HTTP GET. This in turn allows us to increase
the scan_interval to 60 seconds by default.
Additionally scan_interval has been introduced as a config parameter.
This commit is contained in:
Hans Oischinger 2020-03-28 12:12:27 +01:00 committed by GitHub
parent 95cefd1acc
commit 4a2236fe85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 11 deletions

View file

@ -1,5 +1,4 @@
"""Viessmann ViCare climate device."""
from datetime import timedelta
import logging
import requests
@ -80,9 +79,6 @@ HA_TO_VICARE_PRESET_HEATING = {
PYVICARE_ERROR = "error"
# Scan interval of 15 minutes seems to be safe to not hit the ViCare server rate limit
SCAN_INTERVAL = timedelta(seconds=900)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Create the ViCare climate devices."""