Skip to content

Commit

Permalink
Fix scan interval update on charging
Browse files Browse the repository at this point in the history
The wrong value was given as key to coordinator options and therefore
DEFAULT_SCAN_INTERVAL got set regardless of configured value.
  • Loading branch information
DasBasti committed Jun 17, 2024
1 parent 3d30794 commit 383121e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/smarthashtag/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
DEFAULT_DRIVING_INTERVAL,
DEFAULT_SCAN_INTERVAL,
DOMAIN,
MIN_SCAN_INTERVAL,
)
from .coordinator import SmartHashtagDataUpdateCoordinator
from .entity import SmartHashtagEntity
Expand Down Expand Up @@ -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
)
)

Expand Down

0 comments on commit 383121e

Please sign in to comment.