The timer is Idle when it’s finished, canceled, or never started
The timer is Active when it is currently running
The timer has the state Paused when it is paused
We can check the status of timers using events in Home Assistant. So we can see if the timer is canceled, finished, started, restarted, or paused. We are going to check if the timer is finished or canceled in this example to keep it simple.
In our use case, we are going to use the random function of Home Assistant to turn off the lights after a random time interval between 1 and 30 minutes. In this case, it can happen that Home Assistant gets restarted in between. I will show you that the timer will still be alive after the restart.
I created a simple dashboard that contains the status of the light and the status of the timer so that we can follow the progress of our timer.
https://www.smarthomejunkie.net/how-to-use-timers-perfectly-in-home-assistant/