Remove invalid helper script from global package
- Remove script.get_mode_color which had incorrect response syntax - Replace with usage notes showing how to access mode colors in templates - Blueprints and automations access colors directly via templates - Fixes 'extra keys not allowed @ data['sequence'][0]['response']' error
This commit is contained in:
@@ -47,21 +47,8 @@ input_text:
|
||||
# =============================================================================
|
||||
|
||||
# =============================================================================
|
||||
# HELPER SCRIPTS
|
||||
# USAGE NOTES
|
||||
# =============================================================================
|
||||
|
||||
script:
|
||||
get_mode_color:
|
||||
alias: "Get LED Color for Mode"
|
||||
description: "Returns the LED color value (0-255) for a given mode name"
|
||||
fields:
|
||||
mode:
|
||||
description: "Mode name (e.g., 'Reading', 'Sleep')"
|
||||
example: "Reading"
|
||||
sequence:
|
||||
- stop: "Color retrieved"
|
||||
response_variable: "color"
|
||||
response:
|
||||
color: >-
|
||||
{% set colors = states('input_text.adaptive_lighting_mode_colors') | from_json %}
|
||||
{{ colors.get(mode, 170) }}
|
||||
# To access mode colors in templates:
|
||||
# {% set colors = states('input_text.adaptive_lighting_mode_colors') | from_json %}
|
||||
# {{ colors.get('Reading', 170) }}
|
||||
|
||||
Reference in New Issue
Block a user