Fire restarted event on restarting active timer (#30475)

* Fire restarted event on restarting active timer

* Added test for the restart event
This commit is contained in:
Markus Nigbur authored and Paulus Schoutsen committed 2020-01-07 00:00:23 +01:00
1 parent 6f92c19302
commit 453f7c7294
2 files changed
+70 -1

No files matched your search

+1 -1
View File
@@ -180,7 +180,7 @@ class Timer(RestoreEntity):
newduration = duration
event = EVENT_TIMER_STARTED
if self._state == STATUS_PAUSED:
if self._state == STATUS_ACTIVE or self._state == STATUS_PAUSED:
event = EVENT_TIMER_RESTARTED
self._state = STATUS_ACTIVE