I think this happens in the background, it tries to convert the rgb vlaue to color temp and then sends the color temp to the light, but not sure on this one.
Aside from what burningstone said above about trying to force a list into an integer try adding “legacy_templates: false” into your “homeassistant:” section in your configuration.yaml.
That should make you start using the new template engine and once you remove that “int” it might keep it as a list and allow it to work.
as far as using color_temp: in the script it’s hard to tell why that would fail since we haven’t seen that script syntax or the data it relies on.
No, I don’t think so. That’s been reported multiple times now, that the new template engine converts list with only ints, separated by a comma to a string, no matter what you do.
No, not likely. it only affects certain templates and most people don’t really notice.
I’m using it on 117.3 right now and I only had a few templates that needed conversions and they were all related to a custom component configuration (hass-variables)
Hmmm…I think that’s backwards based on this statement from that post:
I know it’s definitely a bit confusing.
What’s worse is that becxause of a bug in the template editor makes it difficult to test this functionality.
Logger: homeassistant.components.websocket_api.http.connection
Source: core.py:1405
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 17:35:41 (5 occurrences)
Last logged: 17:49:43
[1741517536] expected int for dictionary value @ data['color_temp']
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1405, in async_call
processed_data = handler.schema(service_data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in __call__
return self._exec((Schema(val) for val in self.validators), v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 340, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 336, in _exec
v = func(v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 215, in _run
return self._exec(self._compiled, value, path)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 340, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 338, in _exec
v = func(path, v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
return schema(data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: expected int for dictionary value @ data['color_temp']
Hi all, does anybody have found a solution for this?
Meanwhile, the code which works so far suddenly throws an error since yesterday evening.
Why yesterday, why not from the beginning? I’m confused.
I believe not. I luckily came across this post after being confronted with the same error. I wanted to dynamically generate the values for rgb_color on a service call for lights on. Eventually this worked;