mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Use scan_interval in netdata
(#80959)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
33ef2abf9e
commit
c4f6b8a55b
@ -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."""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user