mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-11-04 09:18:37 +01:00
- Brightness: a zero/negative linear or tanh ramp no longer divides by zero; brightness switches instantly at sunrise/sunset instead. - Color temp: adapt_until_sleep now fades smoothly when the sleep color temp is cooler than min_color_temp (no jump at sunset). - RGB fade: hue takes the short way around the color wheel and keeps the colored end's hue when fading to/from white or grey. - Setting autoreset_control_seconds to 0 now clears a leftover delay, unless another profile for the same light still uses auto-reset. - Turning the switch off during adapt_delay skips quietly instead of failing an assertion. - Proactive-adaptation tracking is scoped per light, so one automation turning on light A no longer hides a manual change to light B made under the same context. - Remove turn_on_lights from change_switch_settings in services.yaml and translations; the service schema never accepted it. - Unload: drop the never-removed hass.config.entry_updated listener, keep the update listener when unload fails, and disable the shared manager on the last unload even after a YAML import (keeping the YAML marker). Adds a regression test for each fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
264 lines
9.3 KiB
YAML
264 lines
9.3 KiB
YAML
# This file is auto-generated by .github/update-services.py.
|
|
apply:
|
|
description: Applies the current Adaptive Lighting settings to lights.
|
|
fields:
|
|
entity_id:
|
|
description: The `entity_id` of the switch with the settings to apply. 📝
|
|
selector:
|
|
entity:
|
|
integration: adaptive_lighting
|
|
domain: switch
|
|
multiple: false
|
|
lights:
|
|
description: A light (or list of lights) to apply the settings to. 💡
|
|
selector:
|
|
entity:
|
|
domain: light
|
|
multiple: true
|
|
transition:
|
|
description: Duration of transition when lights change, in seconds. 🕑
|
|
example: 10
|
|
selector:
|
|
text: null
|
|
adapt_brightness:
|
|
description: Whether to adapt the brightness of the light. 🌞
|
|
example: true
|
|
selector:
|
|
boolean: null
|
|
adapt_color:
|
|
description: Whether to adapt the color on supporting lights. 🌈
|
|
example: true
|
|
selector:
|
|
boolean: null
|
|
prefer_rgb_color:
|
|
description: Whether to prefer RGB color adjustment over light color temperature when possible. 🌈
|
|
example: false
|
|
selector:
|
|
boolean: null
|
|
turn_on_lights:
|
|
description: Whether to turn on lights that are currently off. 🔆
|
|
example: false
|
|
selector:
|
|
boolean: null
|
|
set_manual_control:
|
|
description: Mark whether a light is 'manually controlled'.
|
|
fields:
|
|
entity_id:
|
|
description: The `entity_id` of the switch in which to (un)mark the light as being `manually controlled`. 📝
|
|
selector:
|
|
entity:
|
|
integration: adaptive_lighting
|
|
domain: switch
|
|
multiple: false
|
|
lights:
|
|
description: entity_id(s) of lights, if not specified, all lights in the switch are selected. 💡
|
|
selector:
|
|
entity:
|
|
domain: light
|
|
multiple: true
|
|
manual_control:
|
|
description: Whether to add ("true") or remove ("false") all adapted attributes of the light from the "manual_control" list, or the name of an attribute for selective addition. 🔒
|
|
example: true
|
|
default: true
|
|
selector:
|
|
boolean: null
|
|
change_switch_settings:
|
|
description: Change any settings you'd like in the switch. All options here are the same as in the config flow.
|
|
target:
|
|
entity:
|
|
integration: adaptive_lighting
|
|
domain: switch
|
|
fields:
|
|
use_defaults:
|
|
description: 'Sets the default values not specified in this service call. Options: "current" (default, retains current values), "factory" (resets to documented defaults), or "configuration" (reverts to switch config defaults). ⚙️'
|
|
example: current
|
|
required: false
|
|
default: current
|
|
selector:
|
|
select:
|
|
options:
|
|
- current
|
|
- configuration
|
|
- factory
|
|
include_config_in_attributes:
|
|
description: Show all options as attributes on the switch in Home Assistant when set to `true`. 📝
|
|
required: false
|
|
selector:
|
|
boolean: null
|
|
initial_transition:
|
|
description: Duration of the first transition when lights turn from `off` to `on` in seconds. ⏲️
|
|
example: 1
|
|
required: false
|
|
selector:
|
|
text: null
|
|
sleep_transition:
|
|
description: Duration of transition when "sleep mode" is toggled in seconds. 😴
|
|
example: 1
|
|
required: false
|
|
selector:
|
|
text: null
|
|
max_brightness:
|
|
description: Maximum brightness percentage. 💡
|
|
required: false
|
|
example: 100
|
|
selector:
|
|
text: null
|
|
max_color_temp:
|
|
description: Coldest color temperature in Kelvin. ❄️
|
|
required: false
|
|
example: 5500
|
|
selector:
|
|
text: null
|
|
min_brightness:
|
|
description: Minimum brightness percentage. 💡
|
|
required: false
|
|
example: 1
|
|
selector:
|
|
text: null
|
|
min_color_temp:
|
|
description: Warmest color temperature in Kelvin. 🔥
|
|
required: false
|
|
example: 2000
|
|
selector:
|
|
text: null
|
|
only_once:
|
|
description: Adapt lights only when they are turned on (`true`) or keep adapting them (`false`). 🔄
|
|
example: false
|
|
required: false
|
|
selector:
|
|
boolean: null
|
|
prefer_rgb_color:
|
|
description: Whether to prefer RGB color adjustment over light color temperature when possible. 🌈
|
|
required: false
|
|
example: false
|
|
selector:
|
|
boolean: null
|
|
expand_light_groups:
|
|
description: Expand light groups to their members (`true`, default). Set `false` to send commands to the group and track manual control for the group. Explicit member targets in services stay individual targets.
|
|
required: false
|
|
example: true
|
|
selector:
|
|
boolean: null
|
|
separate_turn_on_commands:
|
|
description: Use separate `light.turn_on` calls for color and brightness, needed for some light types. 🔀
|
|
required: false
|
|
example: false
|
|
selector:
|
|
boolean: null
|
|
send_split_delay:
|
|
description: Delay (ms) between `separate_turn_on_commands` for lights that don't support simultaneous brightness and color setting. ⏲️
|
|
required: false
|
|
example: 0
|
|
selector:
|
|
boolean: null
|
|
sleep_brightness:
|
|
description: Brightness percentage of lights in sleep mode. 😴
|
|
required: false
|
|
example: 1
|
|
selector:
|
|
text: null
|
|
sleep_rgb_or_color_temp:
|
|
description: Use either `"rgb_color"` or `"color_temp"` in sleep mode. 🌙
|
|
required: false
|
|
example: color_temp
|
|
selector:
|
|
select:
|
|
options:
|
|
- rgb_color
|
|
- color_temp
|
|
sleep_rgb_color:
|
|
description: RGB color in sleep mode (used when `sleep_rgb_or_color_temp` is "rgb_color"). 🌈
|
|
required: false
|
|
selector:
|
|
color_rgb: null
|
|
sleep_color_temp:
|
|
description: Color temperature in sleep mode (used when `sleep_rgb_or_color_temp` is `color_temp`) in Kelvin. 😴
|
|
required: false
|
|
example: 1000
|
|
selector:
|
|
text: null
|
|
sunrise_offset:
|
|
description: Adjust sunrise time with a positive or negative offset in seconds. ⏰
|
|
required: false
|
|
example: 0
|
|
selector:
|
|
number:
|
|
min: -86400
|
|
max: 86300
|
|
sunrise_time:
|
|
description: Set a fixed time (HH:MM:SS) for sunrise. 🌅
|
|
required: false
|
|
example: ''
|
|
selector:
|
|
time: null
|
|
sunset_offset:
|
|
description: Adjust sunset time with a positive or negative offset in seconds. ⏰
|
|
required: false
|
|
example: ''
|
|
selector:
|
|
number:
|
|
min: -86400
|
|
max: 86300
|
|
sunset_time:
|
|
description: Set a fixed time (HH:MM:SS) for sunset. 🌇
|
|
example: ''
|
|
required: false
|
|
selector:
|
|
time: null
|
|
max_sunrise_time:
|
|
description: Set the latest virtual sunrise time (HH:MM:SS), allowing for earlier sunrises. 🌅
|
|
example: ''
|
|
required: false
|
|
selector:
|
|
time: null
|
|
min_sunset_time:
|
|
description: Set the earliest virtual sunset time (HH:MM:SS), allowing for later sunsets. 🌇
|
|
example: ''
|
|
required: false
|
|
selector:
|
|
time: null
|
|
take_over_control:
|
|
description: Pause adaptation of individual lights and hand over (manual) control to other sources that issue `light.turn_on` calls for lights that are on. 🔒
|
|
required: false
|
|
example: true
|
|
selector:
|
|
boolean: null
|
|
take_over_control_mode:
|
|
description: The adaptation pausing mode when other sources change brightness and/or color of lights. `pause_all` always pauses both brightness and color adaptation. `pause_changed` pauses the adaptation of only the changed attributes and continues adapting unchanged attributes, e.g., continues color adaptation when only brightness was changed.
|
|
required: false
|
|
example: pause_changed
|
|
selector:
|
|
select:
|
|
options:
|
|
- pause_all
|
|
- pause_changed
|
|
detect_non_ha_changes:
|
|
description: 'Detects and halts adaptations for non-`light.turn_on` state changes. Needs `take_over_control` enabled. 🕵️ Caution: ⚠️ Some lights might falsely indicate an ''on'' state, which could result in lights turning on unexpectedly. Note that this calls `homeassistant.update_entity` every `interval`! Disable this feature if you encounter such issues.'
|
|
required: false
|
|
example: false
|
|
selector:
|
|
boolean: null
|
|
manual_control_on_external_turn_on:
|
|
description: Treat turn-ons without a matching Home Assistant `light.turn_on` context as manual control. Normal manual-control resets apply. Still allows `detect_non_ha_changes` for already-on lights. Needs `take_over_control` enabled. 🕵️
|
|
required: false
|
|
example: false
|
|
selector:
|
|
boolean: null
|
|
transition:
|
|
description: Duration of transition when lights change, in seconds. 🕑
|
|
required: false
|
|
example: 45
|
|
selector:
|
|
text: null
|
|
adapt_delay:
|
|
description: Wait time (seconds) between light turn on and Adaptive Lighting applying changes. Might help to avoid flickering. ⏲️
|
|
required: false
|
|
example: 0
|
|
selector:
|
|
text: null
|
|
autoreset_control_seconds:
|
|
description: Automatically reset the manual control after a number of seconds. Set to 0 to disable. ⏲️
|
|
required: false
|
|
example: 0
|
|
selector:
|
|
text: null
|