mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 22:34:04 +02:00
Use markdown-code-runner==2.1.0 (#1152)
* Use `markdown-code-runner==2.1.0` * Use correct arg * uv run * Update README.md, strings.json, and services.yaml
This commit is contained in:
parent
f8719994a6
commit
9a2466cc6f
5 changed files with 25 additions and 25 deletions
8
.github/workflows/update-readme.yml
vendored
8
.github/workflows/update-readme.yml
vendored
|
|
@ -24,16 +24,16 @@ jobs:
|
|||
|
||||
- name: Install markdown-code-runner and README code dependencies
|
||||
run: |
|
||||
pip install markdown-code-runner==1.0.0 pandas tabulate
|
||||
uv pip install markdown-code-runner==2.1.0 pandas tabulate
|
||||
|
||||
- name: Run markdown-code-runner
|
||||
run: markdown-code-runner --debug README.md
|
||||
run: uv run markdown-code-runner --verbose README.md
|
||||
|
||||
- name: Run update services.yaml
|
||||
run: python .github/update-services.py
|
||||
run: uv run python .github/update-services.py
|
||||
|
||||
- name: Run update strings.json
|
||||
run: python .github/update-strings.py
|
||||
run: uv run python .github/update-strings.py
|
||||
|
||||
- name: Commit updated README.md, strings.json, and services.yaml
|
||||
id: commit
|
||||
|
|
|
|||
32
README.md
32
README.md
|
|
@ -96,13 +96,13 @@ Transform your home's atmosphere with Adaptive Lighting 🏠, and experience the
|
|||
All of the configuration options are listed below, along with their default values.
|
||||
The YAML and frontend configuration methods support all of the options listed below.
|
||||
|
||||
<!-- START_CODE -->
|
||||
<!-- CODE:START -->
|
||||
<!-- from homeassistant.components.adaptive_lighting import _docs_helpers -->
|
||||
<!-- print(_docs_helpers.generate_config_markdown_table()) -->
|
||||
<!-- END_CODE -->
|
||||
<!-- CODE:END -->
|
||||
|
||||
<!-- START_OUTPUT -->
|
||||
<!-- THIS CONTENT IS AUTOMATICALLY GENERATED -->
|
||||
<!-- OUTPUT:START -->
|
||||
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
|
||||
| Variable name | Description | Default | Type |
|
||||
|:-------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------|:---------------------------------------|
|
||||
| `lights` | List of light entity_ids to be controlled (may be empty). 🌟 | `[]` | list of `entity_id`s |
|
||||
|
|
@ -132,7 +132,7 @@ The YAML and frontend configuration methods support all of the options listed be
|
|||
| `brightness_mode_time_dark` | (Ignored if `brightness_mode='default'`) The duration in seconds to ramp up/down the brightness before/after sunrise/sunset. 📈📉 | `900` | `int` |
|
||||
| `brightness_mode_time_light` | (Ignored if `brightness_mode='default'`) The duration in seconds to ramp up/down the brightness after/before sunrise/sunset. 📈📉. | `3600` | `int` |
|
||||
| `take_over_control` | Disable Adaptive Lighting if another source calls `light.turn_on` while lights are on and being adapted. Note that this calls `homeassistant.update_entity` every `interval`! 🔒 | `True` | `bool` |
|
||||
| `detect_non_ha_changes` | 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. Disable this feature if you encounter such issues. | `False` | `bool` |
|
||||
| `detect_non_ha_changes` | 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. Disable this feature if you encounter such issues. | `False` | `bool` |
|
||||
| `autoreset_control_seconds` | Automatically reset the manual control after a number of seconds. Set to 0 to disable. ⏲️ | `0` | `int` 0-31536000 |
|
||||
| `only_once` | Adapt lights only when they are turned on (`true`) or keep adapting them (`false`). 🔄 | `False` | `bool` |
|
||||
| `adapt_only_on_bare_turn_on` | When turning lights on initially. If set to `true`, AL adapts only if `light.turn_on` is invoked without specifying color or brightness. ❌🌈 This e.g., prevents adaptation when activating a scene. If `false`, AL adapts regardless of the presence of color or brightness in the initial `service_data`. Needs `take_over_control` enabled. 🕵️ | `False` | `bool` |
|
||||
|
|
@ -144,7 +144,7 @@ The YAML and frontend configuration methods support all of the options listed be
|
|||
| `multi_light_intercept` | Intercept and adapt `light.turn_on` calls that target multiple lights. ➗⚠️ This might result in splitting up a single `light.turn_on` call into multiple calls, e.g., when lights are in different switches. Requires `intercept` to be enabled. | `True` | `bool` |
|
||||
| `include_config_in_attributes` | Show all options as attributes on the switch in Home Assistant when set to `true`. 📝 | `False` | `bool` |
|
||||
|
||||
<!-- END_OUTPUT -->
|
||||
<!-- OUTPUT:END -->
|
||||
|
||||
Full example:
|
||||
|
||||
|
|
@ -179,13 +179,13 @@ adaptive_lighting:
|
|||
|
||||
`adaptive_lighting.apply` applies Adaptive Lighting settings to lights on demand.
|
||||
|
||||
<!-- START_CODE -->
|
||||
<!-- CODE:START -->
|
||||
<!-- from homeassistant.components.adaptive_lighting import _docs_helpers -->
|
||||
<!-- print(_docs_helpers.generate_apply_markdown_table()) -->
|
||||
<!-- END_CODE -->
|
||||
<!-- CODE:END -->
|
||||
|
||||
<!-- START_OUTPUT -->
|
||||
<!-- THIS CONTENT IS AUTOMATICALLY GENERATED -->
|
||||
<!-- OUTPUT:START -->
|
||||
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
|
||||
| Service data attribute | Description | Required | Type |
|
||||
|:-------------------------|:-------------------------------------------------------------------------------------|:-----------|:---------------------|
|
||||
| `entity_id` | The `entity_id` of the switch with the settings to apply. 📝 | ✅ | list of `entity_id`s |
|
||||
|
|
@ -196,25 +196,25 @@ adaptive_lighting:
|
|||
| `prefer_rgb_color` | Whether to prefer RGB color adjustment over light color temperature when possible. 🌈 | ❌ | bool |
|
||||
| `turn_on_lights` | Whether to turn on lights that are currently off. 🔆 | ❌ | bool |
|
||||
|
||||
<!-- END_OUTPUT -->
|
||||
<!-- OUTPUT:END -->
|
||||
#### `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.
|
||||
|
||||
<!-- START_CODE -->
|
||||
<!-- CODE:START -->
|
||||
<!-- from homeassistant.components.adaptive_lighting import _docs_helpers -->
|
||||
<!-- print(_docs_helpers.generate_set_manual_control_markdown_table()) -->
|
||||
<!-- END_CODE -->
|
||||
<!-- CODE:END -->
|
||||
|
||||
<!-- START_OUTPUT -->
|
||||
<!-- THIS CONTENT IS AUTOMATICALLY GENERATED -->
|
||||
<!-- OUTPUT:START -->
|
||||
<!-- ⚠️ This content is auto-generated by `markdown-code-runner`. -->
|
||||
| Service data attribute | Description | Required | Type |
|
||||
|:-------------------------|:-----------------------------------------------------------------------------------------------|:-----------|:---------------------|
|
||||
| `entity_id` | The `entity_id` of the switch in which to (un)mark the light as being `manually controlled`. 📝 | ✅ | list of `entity_id`s |
|
||||
| `lights` | entity_id(s) of lights, if not specified, all lights in the switch are selected. 💡 | ❌ | list of `entity_id`s |
|
||||
| `manual_control` | Whether to add ("true") or remove ("false") the light from the "manual_control" list. 🔒 | ❌ | bool |
|
||||
|
||||
<!-- END_OUTPUT -->
|
||||
<!-- OUTPUT:END -->
|
||||
#### `adaptive_lighting.change_switch_settings`
|
||||
|
||||
`adaptive_lighting.change_switch_settings` (new in 1.7.0) Change any of the above configuration options of Adaptive Lighting (such as `sunrise_time` or `prefer_rgb_color`) with a service call directly from your script/automation.
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ change_switch_settings:
|
|||
selector:
|
||||
boolean: null
|
||||
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. Disable this feature if you encounter such issues.'
|
||||
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. Disable this feature if you encounter such issues.'
|
||||
required: false
|
||||
example: false
|
||||
selector:
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
"brightness_mode_time_dark": "brightness_mode_time_dark",
|
||||
"brightness_mode_time_light": "brightness_mode_time_light",
|
||||
"take_over_control": "take_over_control: Disable Adaptive Lighting if another source calls `light.turn_on` while lights are on and being adapted. Note that this calls `homeassistant.update_entity` every `interval`! 🔒",
|
||||
"detect_non_ha_changes": "detect_non_ha_changes: 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. Disable this feature if you encounter such issues.",
|
||||
"detect_non_ha_changes": "detect_non_ha_changes: 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. Disable this feature if you encounter such issues.",
|
||||
"autoreset_control_seconds": "autoreset_control_seconds",
|
||||
"only_once": "only_once: Adapt lights only when they are turned on (`true`) or keep adapting them (`false`). 🔄",
|
||||
"adapt_only_on_bare_turn_on": "adapt_only_on_bare_turn_on: When turning lights on initially. If set to `true`, AL adapts only if `light.turn_on` is invoked without specifying color or brightness. ❌🌈 This e.g., prevents adaptation when activating a scene. If `false`, AL adapts regardless of the presence of color or brightness in the initial `service_data`. Needs `take_over_control` enabled. 🕵️",
|
||||
|
|
@ -247,7 +247,7 @@
|
|||
"name": "take_over_control"
|
||||
},
|
||||
"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. Disable this feature if you encounter such issues.",
|
||||
"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. Disable this feature if you encounter such issues.",
|
||||
"name": "detect_non_ha_changes"
|
||||
},
|
||||
"transition": {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
"brightness_mode_time_dark": "brightness_mode_time_dark",
|
||||
"brightness_mode_time_light": "brightness_mode_time_light",
|
||||
"take_over_control": "take_over_control: Disable Adaptive Lighting if another source calls `light.turn_on` while lights are on and being adapted. Note that this calls `homeassistant.update_entity` every `interval`! 🔒",
|
||||
"detect_non_ha_changes": "detect_non_ha_changes: 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. Disable this feature if you encounter such issues.",
|
||||
"detect_non_ha_changes": "detect_non_ha_changes: 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. Disable this feature if you encounter such issues.",
|
||||
"autoreset_control_seconds": "autoreset_control_seconds",
|
||||
"only_once": "only_once: Adapt lights only when they are turned on (`true`) or keep adapting them (`false`). 🔄",
|
||||
"adapt_only_on_bare_turn_on": "adapt_only_on_bare_turn_on: When turning lights on initially. If set to `true`, AL adapts only if `light.turn_on` is invoked without specifying color or brightness. ❌🌈 This e.g., prevents adaptation when activating a scene. If `false`, AL adapts regardless of the presence of color or brightness in the initial `service_data`. Needs `take_over_control` enabled. 🕵️",
|
||||
|
|
@ -248,7 +248,7 @@
|
|||
"name": "take_over_control"
|
||||
},
|
||||
"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. Disable this feature if you encounter such issues.",
|
||||
"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. Disable this feature if you encounter such issues.",
|
||||
"name": "detect_non_ha_changes"
|
||||
},
|
||||
"transition": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue