diff --git a/homeassistant/components/influxdb/const.py b/homeassistant/components/influxdb/const.py index e66a0fe10c4..77f76745ba4 100644 --- a/homeassistant/components/influxdb/const.py +++ b/homeassistant/components/influxdb/const.py @@ -84,7 +84,7 @@ TEST_QUERY_V1 = "SHOW DATABASES;" TEST_QUERY_V2 = "buckets()" CODE_INVALID_INPUTS = 400 -MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=60) +MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=10) RE_DIGIT_TAIL = re.compile(r"^[^\.]*\d+\.?\d+[^\.]*$") RE_DECIMAL = re.compile(r"[^\d.]+") diff --git a/homeassistant/components/influxdb/sensor.py b/homeassistant/components/influxdb/sensor.py index 299fc595f4b..c2cb5070a4c 100644 --- a/homeassistant/components/influxdb/sensor.py +++ b/homeassistant/components/influxdb/sensor.py @@ -1,7 +1,9 @@ """InfluxDB component which allows you to get data from an Influx database.""" from __future__ import annotations +import datetime import logging +from typing import Final import voluptuous as vol @@ -62,6 +64,8 @@ from .const import ( _LOGGER = logging.getLogger(__name__) +SCAN_INTERVAL: Final = datetime.timedelta(seconds=60) + def _merge_connection_config_into_query(conf, query): """Merge connection details into each configured query."""