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:
2025-12-20 14:41:53 -08:00
parent ea426e56ef
commit ea20e11bdd

View File

@@ -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) }}