adaptive-lighting/custom_components/adaptive_lighting/services.yaml
Mario Guggenberger f84ee445b7
Individual manual control of brightness and color (#1356)
* refactor: introduce light control parameter enum

* refactor: replace manual control flag with parameter enum

* test: update deprecated color temp attribute

* build: set execution bits on task scripts

* feat: individual manual control of brightness and color

* test: add tests for individual manual control evaluation

* fix: sequential manual changes not always detected

If multiple attributes of a light were changed within an interval, only the last change was detected because the check in the interval only used the latest event. For example, if there was a brightness change and a following color change, only the color attribute was detected as manually controlled. To fix this, the manual control attribute flags are now set directly from the event handler so that all events are processed.

* fix: invalid service description

* docs: fix missing space in config description

* refactor: pluralize multivalued bitmask enum name
2025-12-22 22:55:16 -08:00

260 lines
8.8 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.
fields:
entity_id:
description: Entity ID of the switch. 📝
required: true
selector:
entity:
domain: switch
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
turn_on_lights:
description: Whether to turn on lights that are currently off. 🔆
example: false
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
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: 0
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: 0
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
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