I have one of the Cube controllers
I can get the number of times I want the volume to be raised using
{{(trigger.event.data.args.relative_degrees *-1 / 360 * 45) | int()}}
I have it working using a repeat at the yaml level but this is a bit slow
Ideally what I want is to use a template to add the number of lines of
VolumeUp or VolumeDown that I want.
Would repeat the number of times computerd above so a value of 3 would return
command: >
{% set r = (trigger.event.data.args.relative_degrees / 360 * 45) %}
{% set i = r|int() %}
{% set x = ['VolumeUp']|batch(i, 'VolumeUp')%}
{%- for row in x %}
{{ row }}
{%- endfor %}