From df4a76d62775ecbc932c7852e92b53595d145fa8 Mon Sep 17 00:00:00 2001 From: Phil Bruckner Date: Fri, 29 Dec 2023 17:16:41 -0600 Subject: [PATCH] Change minimum scan_interval to 0.5 minutes --- custom_components/illuminance/config_flow.py | 2 +- custom_components/illuminance/const.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/illuminance/config_flow.py b/custom_components/illuminance/config_flow.py index b78221b..b478389 100644 --- a/custom_components/illuminance/config_flow.py +++ b/custom_components/illuminance/config_flow.py @@ -74,7 +74,7 @@ async def async_step_options( default=self.options.get(CONF_SCAN_INTERVAL, DEFAULT_SCAN_INTERVAL_MIN), ): NumberSelector( NumberSelectorConfig( - min=MIN_SCAN_INTERVAL_MIN, mode=NumberSelectorMode.BOX + min=MIN_SCAN_INTERVAL_MIN, step=0.5, mode=NumberSelectorMode.BOX ) ), vol.Required( diff --git a/custom_components/illuminance/const.py b/custom_components/illuminance/const.py index 96205ba..7f9834b 100644 --- a/custom_components/illuminance/const.py +++ b/custom_components/illuminance/const.py @@ -3,7 +3,7 @@ DOMAIN = "illuminance" DEFAULT_NAME = "Illuminance" -MIN_SCAN_INTERVAL_MIN = 5 +MIN_SCAN_INTERVAL_MIN = 0.5 MIN_SCAN_INTERVAL = timedelta(minutes=MIN_SCAN_INTERVAL_MIN) DEFAULT_SCAN_INTERVAL_MIN = 5 DEFAULT_SCAN_INTERVAL = timedelta(minutes=DEFAULT_SCAN_INTERVAL_MIN)