mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 06:44:04 +02:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
d0091f1f2b
commit
2a95703378
3 changed files with 9 additions and 7 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -267,4 +267,4 @@
|
|||
"description": "Markiere, ob ein Licht \"manuell gesteuert\" ist."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue