Sago
November 4, 2020, 2:15pm
1
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.
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
tom_l
November 4, 2020, 2:18pm
2
Sago:
What am I doint wrong?
Nothing. That looks correct.
What version of home assistant are you running?
Sago
November 4, 2020, 2:23pm
3
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…
Sago
November 4, 2020, 2:24pm
4
I’m using Home Assistant 0.114.4
tom_l
November 4, 2020, 2:36pm
5
Ah, that’s the issue.
You need to use data_template
.
Later versions do not have this requirement.
1 Like
Sago
November 4, 2020, 3:46pm
6
Thanks, I’m going to test is as soon as possible!
I’ll let you know
Sago
November 5, 2020, 10:09am
7
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.
Sago
November 5, 2020, 10:25am
9
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
Sago
November 5, 2020, 3:20pm
10
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!