Problem: I would like to define a text selector in my blueprint script with a dictionary but it’s being ignored. If I pass the dictionary to the script in an automation action call, it works fine.
Context: I have a blueprint script which takes inputs and configures the LEDs on Inovelli dimmers. These dimmers have seven individual LEDs which can be configured individually, or as a single LED bar. The dictionary is a way to pass custom values for each LED.
Reproducer: From “Settings” → “Automations & scenes” → “Blueprints”, I select “Create Script” in the vertical ellipsis menu. On the new screen I select “edit in YAML” and configure it with the below info:
alias: "Day: Inovelli LED Settings and Effects - Public"
use_blueprint:
path: kschlichter/inovelli_led_blueprint.yaml
input:
LEDnumber: All
LEDcolor_custom: >-
{'led 1':200,'led 2':195,'led 3':155,'led 4':155,'led 5':55,'led 6':55,'led 7':255,'all':0}
entity:
- light.office
LEDcolor: all custom on
If I save the blueprint and “run script”, the LED bar turns red. This is the default behavior if LEDcolor_customis not defined by the user. In the trace, I can see that there is no LEDcolor_custom variable defined. The LEDcolor variable is correctly defined as all custom on and if I change it to teal or pink, I can see that value changing in each trace and the LED bar changes color as well. Brightness and other variables are recognized and passed into the script as well. Only the text selector LEDcolor_custom is missing from the “changed variables” list in the trace. There are no errors in my logs.
If I write a simple automation with an action calling the script and passing the same values, the LEDs in my office light change colors.
- action: script.day_inovelli_led_settings_and_effects_public
data:
LEDnumber: All
LEDcolor_custom: >-
{'led 1':200,'led 2':195,'led 3':155,'led 4':155,'led 5':55,'led 6':55,'led 7':255,'all':0}
entity:
- light.office
LEDcolor: all custom on
Why can I pass the dictionary in an automation action but not in the script definition?