Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

One script but different action each time?

$
0
0

@NicolasG wrote:

Hey there,
is there a way to write a script that, when executed, is a different one each time, but goes back to the first action after the third time it ran?
I never was good at programming but it may work with a “while” or “for” loop, I guess?

My idea is to have three different scenes inside one script, but if I want to go to scene 2 I press twice, scene 3, three times etc
I also would love it if there’s a timer bound to that: If I haven’t run that script again after 30 seconds, that it resets itself (so that it thinks I press it the first time and not the second time after 30 seconds).

I hope you understand what I mean. Otherwise let me know!

Posts: 5

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>