From 2a95703378c5dc4f5fc0f77d3f605d77dac460e3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2026 09:07:00 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- custom_components/adaptive_lighting/config_flow.py | 12 ++++++------ custom_components/adaptive_lighting/const.py | 2 ++ .../adaptive_lighting/translations/de.json | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/custom_components/adaptive_lighting/config_flow.py b/custom_components/adaptive_lighting/config_flow.py index 4771cb5b..2b2af832 100644 --- a/custom_components/adaptive_lighting/config_flow.py +++ b/custom_components/adaptive_lighting/config_flow.py @@ -10,15 +10,15 @@ from homeassistant.core import callback from homeassistant.helpers.selector import EntitySelector, EntitySelectorConfig from .const import ( # pylint: disable=unused-import - SECTION_SLEEP, - SECTION_SUNRISE, - SECTION_SUNSET, - SECTION_TRANSITION, - SECTION_MISC, CONF_LIGHTS, DOMAIN, EXTRA_VALIDATION, NONE_STR, + SECTION_MISC, + SECTION_SLEEP, + SECTION_SUNRISE, + SECTION_SUNSET, + SECTION_TRANSITION, VALIDATION_TUPLES, ) from .switch import validate @@ -196,7 +196,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow): } full_schema: dict[vol.Marker, Any] = {} - + section_schemas: dict[str, dict[vol.Marker, Any]] = { name: {} for name in self.SECTION_MAP } diff --git a/custom_components/adaptive_lighting/const.py b/custom_components/adaptive_lighting/const.py index ec887bd0..a5ad9d9e 100644 --- a/custom_components/adaptive_lighting/const.py +++ b/custom_components/adaptive_lighting/const.py @@ -396,10 +396,12 @@ SECTION_MISC: set[str] = { CONF_EXPAND_LIGHT_GROUPS, } + def int_between(min_int: int, max_int: int) -> vol.All: """Return an integer between 'min_int' and 'max_int'.""" return vol.All(vol.Coerce(int), vol.Range(min=min_int, max=max_int)) + VALIDATION_TUPLES: list[tuple[str, Any, Any]] = [ # Basic (CONF_LIGHTS, DEFAULT_LIGHTS, cv.entity_ids), # type: ignore[arg-type] diff --git a/custom_components/adaptive_lighting/translations/de.json b/custom_components/adaptive_lighting/translations/de.json index d65edca7..9f76054d 100644 --- a/custom_components/adaptive_lighting/translations/de.json +++ b/custom_components/adaptive_lighting/translations/de.json @@ -267,4 +267,4 @@ "description": "Markiere, ob ein Licht \"manuell gesteuert\" ist." } } -} \ No newline at end of file +}