Thank you for creating this, I ran my yaml through the converter but I noticed this comment that was added:
# MANUAL FIX NEEDED: renamed key, but ensure the value provides Kelvin (not mireds). If mireds, wrap with: {{ (1000000 / VALUE | float) | round(0) | int }}
I am still getting errors when trying to run the automation, here's the full line for context:
color_temp_kelvin: '{{ [([(((4791.67 - 3290.66/(1 + 0.222 * ([([0,state_attr(''sun.sun'', # MANUAL FIX NEEDED: renamed key, but ensure the value provides Kelvin (not mireds). If mireds, wrap with: {{ (1000000 / VALUE | float) | round(0) | int }}
''elevation'')]|max),90]|min**0.81))))|int),max_color_temp]|max),min_color_temp]|min}}'
I apologize if this is outside the scope of this thread, if so I can make a new post separately. But I'm having trouble determining what I need to do in this case as this is all pretty new to me.
Here's the error I'm still getting in the logs:
Logger: homeassistant.components.automation.light_match_kelvin_of_outside_temp
Source: helpers/script.py:2184
Integration: Automation (documentation, issues)
First occurred: May 9, 2026 at 8:33:33 PM (86 occurrences)
Last logged: May 9, 2026 at 11:53:11 PM
Light Match Kelvin of Outside Temp: Choose at step 1: choice 2: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['kelvin']
Light Match Kelvin of Outside Temp: Error executing script. Invalid data for choose at pos 1: extra keys not allowed @ data['kelvin']
Light Match Kelvin of Outside Temp: Choose at step 1: choice 1: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['kelvin']
Light Match Kelvin of Outside Temp: Choose at step 1: choice 2: Error executing script. Invalid data for call_service at pos 1: expected int for dictionary value @ data['color_temp_kelvin']
Light Match Kelvin of Outside Temp: Error executing script. Invalid data for choose at pos 1: expected int for dictionary value @ data['color_temp_kelvin']
Logger: homeassistant.components.automation.light_match_kelvin_of_outside_temp
Source: components/automation/__init__.py:889
Integration: Automation (documentation, issues)
First occurred: May 9, 2026 at 8:33:33 PM (43 occurrences)
Last logged: May 9, 2026 at 11:53:11 PM
Error while executing automation automation.light_match_kelvin_of_outside_temp: extra keys not allowed @ data['kelvin']
Error while executing automation automation.light_match_kelvin_of_outside_temp: expected int for dictionary value @ data['color_temp_kelvin']
Logger: homeassistant.components.automation
Source: components/automation/config.py:123
Integration: Automation (documentation, issues)
First occurred: May 9, 2026 at 11:35:37 PM (2 occurrences)
Last logged: May 9, 2026 at 11:41:42 PM
Blueprint 'Match Outside Colour Temperature Kelvin' generated invalid automation with inputs {'target_lights': ['light.hue_ambiance_lamp_1_3', 'light.hue_ambiance_lamp_1_4', 'light.hue_ambiance_lamp_1', 'light.hue_ambiance_lamp_1_2', 'light.hue_ambiance_lamp_1_8', 'light.hue_ambiance_lamp_1_7', 'light.hue_ambiance_lamp_1_5', 'light.hue_ambiance_lamp_1_6', 'light.hue_ambiance_lamp_1_9', 'light.hue_ambiance_lamp_1_10', 'light.hue_ambiance_downlight_1', 'light.hue_ambiance_downlight_2', 'light.hue_ambiance_downlight_3', 'light.hue_ambiance_downlight_4', 'light.hue_ambiance_lamp_1_12', 'light.hue_ambiance_lamp_1_11', 'light.hue_ambiance_lamp_1_13', 'light.hue_ambiance_lamp_1_14', 'light.hue_ambiance_lamp_1_15', 'light.hue_ambiance_lamp_1_16', 'light.hue_ambiance_lamp_1_17', 'light.hue_ambiance_lamp_1_18', 'light.hue_ambiance_lamp_1_19', 'light.hue_ambiance_lamp_1_20', 'light.hue_ambiance_lamp_1_21', 'light.hue_ambiance_lamp_1_22', 'light.hue_ambiance_lamp_1_23', 'light.hue_ambiance_candle_1', 'light.hue_ambiance_candle_2', 'light.hue_ambiance_candle_3', 'light.hue_ambiance_lamp_1_24', 'light.hue_ambiance_lamp_1_25'], 'min_color_temp': 5700, 'max_color_temp': 2500}: invalid template (TemplateSyntaxError: unexpected char '#' at 69) for dictionary value @ data['variables']['color_temp_kelvin']. Got "{{ [([(((4791.67 - 3290.66/(1 + 0.222 * ([([0,state_attr('sun.sun', # MANUAL FIX NEEDED: renamed key, but ensure the value provides Kelvin (not mireds). If mireds, wrap with: {{ (1000000 / VALUE | float) | round(0) | int }} 'elevation')]|max),90]|min**0.81))))|int),max_color_temp]|max),min_color_temp]|min}}"