glyn
(Glyn Davies)
June 8, 2025, 10:53am
1
Hi,
I have a template that has a set_temperature action defined. However I now keep getting the following error in the log;
Got `color_temp` argument in `turn_on` service, which is deprecated and will break in Home Assistant 2026.1, please use `color_temp_kelvin` argument
In preparation for this I would like to start using color_temp_kelvin in my template light however there does not seem to be a way of getting the kelvin value that is passed into the template
Any ideas please?
tom_l
June 8, 2025, 11:24am
2
The attribute is only available if the light supports it and if the light is on.
{{ state_attr('light.lifx_cinema_left','color_temp_kelvin') }}
glyn
(Glyn Davies)
June 8, 2025, 1:43pm
3
Hi Tom,
I don’t think I made myself clear. I would normally set the color_temp in the template light as follows.
action: light.turn_on
data:
color_temp: 300
target:
entity_id: light.study_ceiling_template
I could then reference the value of color_temp in the template light by referencing the variable color_temp.
I now wish to use color_temp_kelvin. I would now pass this to the template light as follows:
action: light.turn_on
data:
color_temp_kelvin: 4010
target:
entity_id: light.study_ceiling_template
However the value of color_temp_kelvin does not seem to get passed as a variable to the template light.
tom_l
June 8, 2025, 1:49pm
4
Yeah the template light integration has not been updated to use color_temp_kelvin
yet: https://www.home-assistant.io/integrations/light.template/#considerations
The core team should update it before color_temp
is depreciated.
You can open an issue here to move it along if you like: GitHub · Where software is built
I searched and an open issue does not already exist for this. Though a couple have been let go stale and auto-closed.
glyn
(Glyn Davies)
June 9, 2025, 6:54am
6
1 Like
NRA
June 9, 2025, 2:01pm
7
I was also receiving this error, I solved it by removing the offending code from my scenes:
Default:
name: Test
entities:
light.bedroom_tv_ambient_light:
min_color_temp_kelvin: 2000
max_color_temp_kelvin: 6535
min_mireds: 153
max_mireds: 500
supported_color_modes:
- color_temp
color_mode: null
brightness: null
color_temp_kelvin: null
color_temp: null
hs_color: null
rgb_color: null
xy_color: null
off_with_transition: true
off_brightness: 38
icon: mdi:television-ambient-light
friendly_name: Bedroom TV Ambient Light
supported_features: 40
state: "off"
metadata: {}
Modified:
id: "1745702793456"
name: Bed Room TV Ambient Light 15% 2700K
entities:
light.bedroom_tv_ambient_light:
min_color_temp_kelvin: 2000
max_color_temp_kelvin: 6535
min_mireds: 153
max_mireds: 500
supported_color_modes:
- color_temp
color_mode: color_temp
brightness: 38
color_temp_kelvin: 2700
color_temp: 446
off_with_transition: false
off_brightness: null
icon: mdi:television-ambient-light
friendly_name: Bedroom TV Ambient Light
supported_features: 40
state: "on"
icon: mdi:led-strip
metadata: {}
tom_l
June 9, 2025, 2:22pm
8
You did not remove it:
NRA:
color_temp_kelvin: 2700
Also, is that a template light?
If not then you need to open a separate issue for that.
tom_l
June 11, 2025, 10:36am
9
Looks like it will be in this month’s release: Add color_temp_kelvin to set_temperature action variables by Petro31 · Pull Request #146448 · home-assistant/core · GitHub
I’m running the beta release but don’t have a template light to test it on.
glyn
(Glyn Davies)
June 11, 2025, 11:04am
10
That was well timed. Thanks for the update.
petro
(Petro)
June 11, 2025, 11:10am
11
Not sure if it’s actually being added to this months release. It was merged into the code base and it will likely make the release, however it could be delayed until next release. FYI. Just check this months release notes to confirm.
Also keep in mind, the warning will still appear because both values are sent to the running script. When the deprecation is over, color_temp will be removed and the warning will go away.
tom_l
June 11, 2025, 11:16am
12
It’s already in 2025.6.0b7
petro
(Petro)
June 11, 2025, 11:16am
13
Alright then, that was faster than normal