Using templates in service parameter

Hi everyone,
I’m trying to use an input_select value as parameter to a service.
I tried in many ways but without any luck.

image

If I paste this in the template window it is decoded correctly, but if I use the service it behaves as if the parameter was empty.

What am I doint wrong?

Thanks all in advance

Nothing. That looks correct.

What version of home assistant are you running?

Thank you for your super-quick answer.
That looks correct to mee to, that’s why I’m going crazy.
When I hit the call service button the light is set to white, as if the color_name parameter was empty.
If I use

color_name: red

or

color:name: "green"

It works.

In the template window I get this

I don’t know what to do…

I’m using Home Assistant 0.114.4

Ah, that’s the issue.

You need to use data_template.

Later versions do not have this requirement.

1 Like

Thanks, I’m going to test is as soon as possible!
I’ll let you know

I’m really sorry to bother you but I just can’t find a way to use data_template.
Whenever I use it I get the following error

Is that the correct way to use data_template?
Thank you

You can’t use it in the services tab.

Upgrade your homeassistant and you will no longer need data_template.

Thank you, I guess that’s the way…
I didn’t upgrade it yet because I haven’t setup a good backup system.
I’ll let you know, thanks

It worked! I upgraded and now it works!
I still don’t understand why it doesn’t work from the services tab… So I made an automation and from there it works…
Anyway thank you!