Fix scan_interval in Scrape (#83758)

Scrape fix scan_interval
This commit is contained in:
G Johansson 2022-12-11 19:19:04 +01:00 committed by GitHub
parent 5fa9da25f2
commit 127eca3c35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
load_coroutines: list[Coroutine[Any, Any, None]] = []
for resource_config in scrape_config:
rest = create_rest_data_from_config(hass, resource_config)
scan_interval: timedelta = config.get(CONF_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL)
scan_interval: timedelta = resource_config.get(
CONF_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL
)
coordinator = ScrapeCoordinator(hass, rest, scan_interval)
sensors: list[ConfigType] = resource_config.get(SENSOR_DOMAIN, [])