AlertManager

class sitchlib.AlertManager(device_id)[source]

AlertManager is used to ensure alerts are consistently formatted.

build_alert(alert_id, alert_message)[source]

Build the actual alert and returns it, formatted.

Parameters:
  • alert_id (int) – The ID of the alert you want to build
  • alert_message (str) – The message to be embedded in the alert.
Returns:

Position 0 contains the string ‘sitch_alert’. Position 1

contains the alert and metadata.

Return type:

tuple

get_alert_type(alert_id)[source]

Return the alert description for alert_id.