adityapattiyeri / home-remote

An EspHome based remote control for Home Assistant
Apache License 2.0
76 stars 1 forks source link

Auto Sleep #5

Closed gazelle-hub closed 2 years ago

gazelle-hub commented 2 years ago

Hi there,

This is a bit of a noob question, but I was looking through the code and I can see how the auto_sleep script is started but I can't figure out how it starts again if another button is pushed?

Thanks in advance for your help.

gazelle-hub commented 2 years ago

Sorry, I've just figured this one out.

You've got "mode: restart" in the script so every time it is executed it restarts the counter.

adityapattiyeri commented 2 years ago

Hey,

Yes. The script restarts and resets the counter every time the button is pressed.