Skip to content

Commit bb94b7b

Browse files
authored
Add documentation for SimpliSafe events (#12081)
* Add documentation for SimpliSafe events * Restrict which events get fired (per code review) * Code review comments from parent PR
1 parent 6a460da commit bb94b7b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

source/_integrations/simplisafe.markdown

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,41 @@ For any property denoting a volume, the following values should be used:
9292
| `exit_delay_home` | yes | The number of seconds to delay triggering when exiting with a "home" state |
9393
| `light` | yes | Whether the light on the base station should display when armed |
9494
| `voice_prompt_volume` | yes | The volume of the base station's voice prompts |
95+
96+
## Events
97+
98+
Automations can listen for `SIMPLISAFE_EVENT` events. Anytime one of these events is
99+
received, it will come with event data that contains the following keys:
100+
101+
* `changed_by`: the PIN that triggered the event (if appropriate)
102+
* `event_type`: the type of event
103+
* `info`: a human-friendly string describing the event in more detail
104+
* `sensor_name`: the sensor that triggered the event (if appropriate)
105+
* `sensor_serial`: the serial number of the sensor that triggered the event (if appropriate)
106+
* `sensor_type`: the type of sensor that triggered the event (if appropriate)
107+
* `system_id`: the system ID to which the event belongs
108+
* `timestamp`: the UTC datetime at which the event was received
109+
110+
For example, when the system is armed by "remote" means (via the web app, etc.), a
111+
`SIMPLISAFE_EVENT` event will fire with the following event data:
112+
113+
```python
114+
{
115+
"changed_by": "",
116+
"event_type": "armed_home",
117+
"info": "System Armed (Home) by Remote Management",
118+
"sensor_name": "",
119+
"sensor_serial": "",
120+
"sensor_type": "remote",
121+
"system_id": 123456,
122+
"timestamp": datetime.datetime(2020, 2, 13, 23, 1, 13, tzinfo=<UTC>),
123+
}
124+
```
125+
126+
`event_type`, being one of the key fields automations might be built from, can have the
127+
following values:
128+
129+
* `camera_motion_detected`
130+
* `doorbell_detected`
131+
* `entry_detected`
132+
* `motion_detected`

0 commit comments

Comments
 (0)