This commit is contained in:
Bas Nijholt 2023-05-31 14:50:56 -07:00
commit cfe565a8b2
3 changed files with 31 additions and 6 deletions

View file

@ -45,6 +45,7 @@ The `adaptive_lighting.manual_control` event is fired when a light is marked as
- [:memo: Options](#memo-options)
- [:hammer_and_wrench: Services](#hammer_and_wrench-services)
- [`adaptive_lighting.apply`](#adaptive_lightingapply)
- [`adaptive_lighting.turn_on`, `adaptive_lighting.turn_off`, `adaptive_lighting.toggle`](#adaptive_lightingturn_on-adaptive_lightingturn_off-adaptive_lightingtoggle)
- [`adaptive_lighting.set_manual_control`](#adaptive_lightingset_manual_control)
- [`adaptive_lighting.change_switch_settings`](#adaptive_lightingchange_switch_settings)
- [:robot: Automation examples](#robot-automation-examples)
@ -176,6 +177,25 @@ adaptive_lighting:
| `turn_on_lights` | Whether to turn on lights that are currently off. 🔆 | ❌ | bool |
<!-- END_OUTPUT -->
#### `adaptive_lighting.turn_on`, `adaptive_lighting.turn_off`, `adaptive_lighting.toggle`
`adaptive_lighting.turn_on`, `adaptive_lighting.turn_off`, `adaptive_lighting.toggle` turn Adaptive Lighting on or off.
TODO: ...
<!-- START_CODE -->
<!-- from homeassistant.components.adaptive_lighting import _docs_helpers -->
<!-- print(_docs_helpers.generate_turn_on_markdown_table()) -->
<!-- END_CODE -->
<!-- START_OUTPUT -->
<!-- THIS CONTENT IS AUTOMATICALLY GENERATED -->
<!-- END_OUTPUT -->
#### `adaptive_lighting.set_manual_control`
`adaptive_lighting.set_manual_control` can mark (or unmark) whether a light is "manually controlled", meaning that when a light has `manual_control`, the light is not adapted.

View file

@ -9,6 +9,7 @@ from .const import (
DOCS,
DOCS_APPLY,
DOCS_MANUAL_CONTROL,
SERVICE_TOGGLE_SCHEMA,
SET_MANUAL_CONTROL_SCHEMA,
VALIDATION_TUPLES,
apply_service_schema,
@ -110,6 +111,10 @@ def generate_apply_markdown_table():
return _generate_service_markdown_table(apply_service_schema(), DOCS_APPLY)
def generate_turn_on_markdown_table():
return _generate_service_markdown_table(SERVICE_TOGGLE_SCHEMA, DOCS_APPLY)
def generate_set_manual_control_markdown_table():
return _generate_service_markdown_table(
SET_MANUAL_CONTROL_SCHEMA, DOCS_MANUAL_CONTROL

View file

@ -211,12 +211,12 @@ DOCS[CONF_WHICH_SWITCH] = (
"Which switch to target in this service call. Options: "
'"main" (default, targets the main switch), "sleep", "brightness", "color"'
)
DOCS[
SERVICE_TURN_ON
] = "Turn on an Adaptive Lighting main/sleep/brightness/color switch"
DOCS[
SERVICE_TURN_OFF
] = "Turn off an Adaptive Lighting main/sleep/brightness/color switch"
DOCS[SERVICE_TURN_ON] = (
"Turn on an Adaptive Lighting" " main/sleep/brightness/color switch"
)
DOCS[SERVICE_TURN_OFF] = (
"Turn off an Adaptive Lighting" " main/sleep/brightness/color switch"
)
DOCS[SERVICE_TOGGLE] = "Toggle an Adaptive Lighting main/sleep/brightness/color switch"
TURNING_OFF_DELAY = 5