Color_temp to color_temp_kelvin migration tool

Home Assistant 2026.3 has removed color_temp (mireds), kelvin , min_mireds , and max_mireds in favor of color_temp_kelvin

Here’s a small tool to copy/paste your yaml into, and it’ll attempt to automatically replace the depreciated constants to their new versions along with the corresponding converted values.

Just made an account to say thank you. Worked well for me.

Thanks, glad it was of help.

Thanks!
This really helped!

Seriously, THANK YOU! This was one of the most annoying changes the HA folks have made in quite a while. This saved me tons of time and headaches!

This was great - for whatever reason the index.html did not work when I copy pasted it from the github GUI, but when I used git clone, everything worked as expected. Probably something goofy with my clipboard I suspect.

Great work!

I created an account just to post and say thank you for this!

Hi,

I’m surprised the HA team broke such a simple thing without considering how difficult it can be to update all different automations manually.
Usually we have a transition period, or a backward compatibility :frowning:

This tool looked like it was the solution, but there is a catch, if you have Yeelight lights, they still use “kelvin:” and this tool replaces it to “color_temp_kelvin:” which breaks all Yeelight automations.

Is there a way to make it smarter and avoid all the yeelight.set_color_temp_scene action ?

example:

Thanks for the good work :slight_smile:

Don’t challenge them…

This change was announced years ago, but somehow they didn’t actually deprecate it until this release.

This means it’s the opposite of what you wrote - it might be the longest transition period in the history of HA

Thanks for the feedback. Added skip logic for non-HA core kelvin occurrences. Should hopefully work for you now.

I find it strange as I used the GUI to do these now broken automations, and I didn’t force any YAML code to specifically force deprecated names… If it was planned to be deprecated, it was still offered and pushed when creating a new automation.

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}}"