From 383121ea10eb30f81e94c69d45274f0699a3b75f Mon Sep 17 00:00:00 2001 From: Bastian Neumann Date: Mon, 17 Jun 2024 16:33:28 +0200 Subject: [PATCH] Fix scan interval update on charging The wrong value was given as key to coordinator options and therefore DEFAULT_SCAN_INTERVAL got set regardless of configured value. --- custom_components/smarthashtag/sensor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/smarthashtag/sensor.py b/custom_components/smarthashtag/sensor.py index fdf97f2..fbe955a 100644 --- a/custom_components/smarthashtag/sensor.py +++ b/custom_components/smarthashtag/sensor.py @@ -22,7 +22,6 @@ DEFAULT_DRIVING_INTERVAL, DEFAULT_SCAN_INTERVAL, DOMAIN, - MIN_SCAN_INTERVAL, ) from .coordinator import SmartHashtagDataUpdateCoordinator from .entity import SmartHashtagEntity @@ -1025,7 +1024,7 @@ def native_value(self) -> str | int | float: else: self.coordinator.update_interval = timedelta( seconds=self.coordinator.config_entry.options.get( - MIN_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL + CONF_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL ) )