From ea20e11bdd3b6b0039e28137a42062abb6d9ce23 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Sat, 20 Dec 2025 14:41:53 -0800 Subject: [PATCH] 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 --- packages/adaptive_lighting_global.yaml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/adaptive_lighting_global.yaml b/packages/adaptive_lighting_global.yaml index 984e6dd..dfbd3ce 100644 --- a/packages/adaptive_lighting_global.yaml +++ b/packages/adaptive_lighting_global.yaml @@ -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) }}