I’m trying to build a vacuum script that lets me clean multiple rooms based on what helper switches are on.
I managed to grab the buttons and put the respective numbers into a text helper. Nearly there.
The only problem I have is that it won’t accept my input as a parameter for the send command.
The moment I save the script with the template:
{{ states(“input_text.test_vacrooms”) }}
With the | and text on the next line is fine. But you cannot put a template on the same line, starting with {{ because that has a different meaning if not in a string. So you should put quotes around it all if it is on the same line:
However, it doesn’t work.
I’ve realized that I probably don’t need the helper and I could just paste all if is_state into the parameters directly, but it only works if I input actual numbers.
As far as I can tell, this is not a template problem, but not knowing if the integration accepts multiple areas? Only if you know what to send (if possible at all), you can think about the template.
When you use multiple lines of if followed by endif, then the lines can be concatenated and you could end up with - 18- 20- 16- 19 as a result.
If one one of should exclude the result the. You need to use elif for the second and all following if lines.