Source code for platypush.message.event.alarm
from typing import Optional
from platypush.message.event import Event
[docs]
class AlarmEvent(Event):
"""
Base class for alarm events.
"""
[docs]
def __init__(self, *args, name: Optional[str] = None, **kwargs):
super().__init__(*args, name=name, **kwargs)
[docs]
class AlarmEnabledEvent(AlarmEvent):
"""
Triggered when an alarm is enabled.
"""
[docs]
class AlarmDisabledEvent(AlarmEvent):
"""
Triggered when an alarm is disabled.
"""
[docs]
class AlarmStartedEvent(AlarmEvent):
"""
Triggered when an alarm starts.
"""
[docs]
class AlarmEndedEvent(AlarmEvent):
"""
Triggered when an alarm stops.
"""
[docs]
class AlarmDismissedEvent(AlarmEndedEvent):
"""
Triggered when an alarm is dismissed.
"""
[docs]
class AlarmSnoozedEvent(AlarmEvent):
"""
Triggered when an alarm is snoozed.
"""
[docs]
class AlarmTimeoutEvent(AlarmEndedEvent):
"""
Triggered when an alarm times out.
"""
# vim:sw=4:ts=4:et: