But the second one shows proper in the template test area.
I can literally copy the output from the template test area into the services area and it works.
yah i don’t think that would work in the service call area because it explicitly says “service data”. I mean you could try a bunch of different things, but templates go in data_templates. You could make it work by making a script and using a data template.
Yeah, I think @petro is correct, it would work from a script/automation (which presumably is the end goal looking at the screenshot) but not in the service area because there is no facility to decode the template there.
Hi,
Did you get this to work ?
I’m trying to do something similar …
Change the siren music, it’s volume and to choose between alarm and doorbell modes.
Can you let me have a look at any working config you have ?
Thanks in advance
Mutt
Sorry Petro is this intended to help ? Aimed at anyone in particular ?
I think the issues have been resolved, in this latest incarnation anyway.
Did read about this in the 0.99 release notes, though you’d have to construct a JSON statement to make use of it, or is that your point, as a test point ?
We needed to be able to change them programmatically, so in the case of my siren, I could set the music to one tune when this event happens and another tune at a different volume should another happen. I think we have reached that (mine works anyway. Thanks for your interest and apologies if it diverted you.
There are a few threads I explored, when I get back I’ll ensure they all have a link back to the solution
Cheers
Mutt
Sorry, I’m away from home and only have access to a remote instance from a phone. Can’t copy and paste as “configuration” will not let me select text. I’ve tried installing Visual Studio Code, but it’s red on my add-ons and say “not available on your platform” (plain vanilla hassos 2.12 on raspberry pi 3 running hassio 0.99.2)
Your posted code will not work as the whole data_template needs encapsulating in curly brackets { }, size is not applicable as the html already defines the data sizes and does the translation from (say) “Fur Elise” to its relevant index.
I just can’t test the “{{ blah de blah}}” (yes I’ve watched hotel transelvania) from here so I’ll give it a go on my return (1 week)
Cheers
Mutt
You can’t use templates in the service calling section of the dev tools, this has never been possible. You can however create a script with the service and run the script.