Hello,
I read the guide of your link and I undestand.
What I can’t understand is why in the page of the honeycomb menu (Link) the author talk about templating with the XYConfig:service_data
There are examples very similar of what I am trying to do but with the hue instead of the position.
If you want to use jinja templating, then what you could do is create a script with templates in it and call that script in the action, no templating needed in the front end.
Hello,
thnk you for your answer. I am trying my best and I swear I’ve tryed a lot and read, for what I was able to find, the documentation.
But till now I am struggle and stuck with this service call. I am able to use that JS but not able to use the parameters from the xypad.
If I write this:
position: '[[[ return 20; ]]]'
it works fine, but if I use this:
position: '[[[ return {{ y }} ]]]'
even if in the docs say that will work, It doesn’t and the honeycomb menu doesn’t appear.
Instead if I use this:
position: '{{ y }}'
The honeycomb menu opens but this is the error that I receive:
Failed to perform the action cover/set_cover_position. expected int for dictionary value @ data[‘position’]
Thank you for support and for any advice or suggestion you can provide.
The quote I showed was a part from the honeycomb docs, trying to show you it used javascript templates, not jinja ones. But I do not think you can get at the information you need from javascript.
What I mentioned below is how you solve it. Write a script with jinja templates to perform the action. then call the script from the action, so you do not need any kind of templating there.
Oh, wait. I didn’t get from your post that y comes from the honeycomb integration. You could try an action to send a notification with the template as message to see what it evaluates to.
Hello,
Luckily I didn’t give up and found the solution.
There was a problem in the Honeycomb menu module which, if the menu was nested, did not pass the XYpad parameters correctly. I reported and opened an issue in the repository and the developer, whom I thank, fixed the problem with a very quick release. Now even for nested menus it is possible to use the XYpad functionality and use the output with the two templating systems.