Automatin Help with repeat.index - show the iteration number in card

Dear Forum,

I´m a bit hanging with using repeat.index and how to access it in a card (if possible).

I got an automation:

value_template: ‘{{repeat.index <= states(’‘input_number.loop’’) | int }}’

That is doing several switch on / off´s. Its controlled by a slider, that works very well.

What I try is to make a card that shows me the repeat.index value (in which loop it is at the moment, how many cycles already had been run ). I tried serveral things , but failing accessing this variable.

Its not working with:

repeat.index.automation.name
stats.automation name (as it´s not a stats)
etc.

The only thing I can see for now is using a “counter”. But isn´t there a quiet smarter, easier way to access this var?

Hope someone got a good hint in what to look at - or idea how it´s been done

You can use an input number, input_text, counter. There’s no way to access an automations variables otherwise.

1 Like

Thanks Petro for your reply,

I´m using input_numer for the amount of loops run. It´s strange that I can write into an automation with input_numer or _text but not output/read a var. But it is as it is and thanks for confirming. I´m then dealing arround with the counter :slight_smile: