mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 14:54:04 +02:00
rename variable
This commit is contained in:
parent
34acd03f46
commit
8f4bd6b2ab
2 changed files with 3 additions and 5 deletions
|
|
@ -105,7 +105,7 @@ def replace_none_str(value, replace_with=None):
|
|||
return value if value != NONE_STR else replace_with
|
||||
|
||||
|
||||
validation_tuples = [
|
||||
_yaml_validation_tuples = [
|
||||
(key, default, maybe_coerce(key, validation))
|
||||
for key, default, validation in VALIDATION_TUPLES
|
||||
] + [(CONF_NAME, DEFAULT_NAME, cv.string)]
|
||||
|
|
@ -113,6 +113,6 @@ validation_tuples = [
|
|||
_DOMAIN_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Optional(key, default=replace_none_str(default, vol.UNDEFINED)): validation
|
||||
for key, default, validation in validation_tuples
|
||||
for key, default, validation in _yaml_validation_tuples
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -104,9 +104,7 @@ async def handle_apply(switch, service_call):
|
|||
data = service_call.data
|
||||
tasks = [
|
||||
await switch._adjust_light(
|
||||
light,
|
||||
data[CONF_TRANSITION],
|
||||
data[CONF_COLORS_ONLY],
|
||||
light, data[CONF_TRANSITION], data[CONF_COLORS_ONLY],
|
||||
)
|
||||
for light in data[CONF_LIGHTS]
|
||||
if not data[CONF_ON_LIGHTS_ONLY] or is_on(switch.hass, light)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue