Use scan_interval in netdata (#80959)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Xeevis 2022-10-26 16:50:01 +02:00 committed by GitHub
parent 33ef2abf9e
commit c4f6b8a55b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,6 @@
"""Support gathering system information of hosts which are running netdata."""
from __future__ import annotations
from datetime import timedelta
import logging
from netdata import Netdata
@ -22,12 +21,9 @@ from homeassistant.exceptions import PlatformNotReady
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from homeassistant.util import Throttle
_LOGGER = logging.getLogger(__name__)
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=1)
CONF_DATA_GROUP = "data_group"
CONF_ELEMENT = "element"
CONF_INVERT = "invert"
@ -223,7 +219,6 @@ class NetdataData:
self.api = api
self.available = True
@Throttle(MIN_TIME_BETWEEN_UPDATES)
async def async_update(self):
"""Get the latest data from the Netdata REST API."""