mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Introduce safe scan_interval for vicare (#32915)
This commit is contained in:
parent
576970d1ad
commit
cd79720a14
@ -1,4 +1,5 @@
|
|||||||
"""Viessmann ViCare climate device."""
|
"""Viessmann ViCare climate device."""
|
||||||
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
@ -79,6 +80,9 @@ HA_TO_VICARE_PRESET_HEATING = {
|
|||||||
|
|
||||||
PYVICARE_ERROR = "error"
|
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):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Create the ViCare climate devices."""
|
"""Create the ViCare climate devices."""
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Viessmann ViCare water_heater device."""
|
"""Viessmann ViCare water_heater device."""
|
||||||
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
@ -42,6 +43,9 @@ HA_TO_VICARE_HVAC_DHW = {
|
|||||||
|
|
||||||
PYVICARE_ERROR = "error"
|
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):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Create the ViCare water_heater devices."""
|
"""Create the ViCare water_heater devices."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user