Alarm Information Struct

Alarm Info

class switchbot_api.alarm_info.AlarmInfo(execute_repeatedly: bool, valid_days: List[DayOfWeek], execution_time: timedelta, exec_type: AlarmExecType, exec_action: AlarmExecAction, num_continuous_actions: int, interval: timedelta)[source]

The information for an alarm

Day of Week

enum switchbot_api.alarm_info.DayOfWeek(value)[source]

The day of the week to execute an alarm on

Valid values are as follows:

MONDAY = <DayOfWeek.MONDAY: 0>
TUESDAY = <DayOfWeek.TUESDAY: 1>
WEDNESDAY = <DayOfWeek.WEDNESDAY: 2>
THURSDAY = <DayOfWeek.THURSDAY: 3>
FRIDAY = <DayOfWeek.FRIDAY: 4>
SATURDAY = <DayOfWeek.SATURDAY: 5>
SUNDAY = <DayOfWeek.SUNDAY: 6>

Alarm Execution Type

enum switchbot_api.alarm_info.AlarmExecType(value)[source]

The type of execution that will occur

Valid values are as follows:

REPEATED = <AlarmExecType.REPEATED: 0>

“Execute repeatedly”

REPEAT_N_TIMES_AT_INTERVAL = <AlarmExecType.REPEAT_N_TIMES_AT_INTERVAL: 1>

“Execute N times every interval”

REPEAT_FOREVER_AT_INTERVAL = <AlarmExecType.REPEAT_FOREVER_AT_INTERVAL: 2>

“Execute forever every interval”

Alarm Execution Action

enum switchbot_api.alarm_info.AlarmExecAction(value)[source]

The action to execute when the alarm is triggered

Valid values are as follows:

ACTION = <AlarmExecAction.ACTION: 0>

“Press”

ON = <AlarmExecAction.ON: 1>

“Turn on”

OFF = <AlarmExecAction.OFF: 2>

“Turn off”