Skip to content

Commit

Permalink
Add documentation for SimpliSafe events (home-assistant#12081)
Browse files Browse the repository at this point in the history
* Add documentation for SimpliSafe events

* Restrict which events get fired (per code review)

* Code review comments from parent PR
  • Loading branch information
bachya authored Feb 14, 2020
1 parent 6a460da commit bb94b7b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions source/_integrations/simplisafe.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,41 @@ For any property denoting a volume, the following values should be used:
| `exit_delay_home` | yes | The number of seconds to delay triggering when exiting with a "home" state |
| `light` | yes | Whether the light on the base station should display when armed |
| `voice_prompt_volume` | yes | The volume of the base station's voice prompts |

## Events

Automations can listen for `SIMPLISAFE_EVENT` events. Anytime one of these events is
received, it will come with event data that contains the following keys:

* `changed_by`: the PIN that triggered the event (if appropriate)
* `event_type`: the type of event
* `info`: a human-friendly string describing the event in more detail
* `sensor_name`: the sensor that triggered the event (if appropriate)
* `sensor_serial`: the serial number of the sensor that triggered the event (if appropriate)
* `sensor_type`: the type of sensor that triggered the event (if appropriate)
* `system_id`: the system ID to which the event belongs
* `timestamp`: the UTC datetime at which the event was received

For example, when the system is armed by "remote" means (via the web app, etc.), a
`SIMPLISAFE_EVENT` event will fire with the following event data:

```python
{
"changed_by": "",
"event_type": "armed_home",
"info": "System Armed (Home) by Remote Management",
"sensor_name": "",
"sensor_serial": "",
"sensor_type": "remote",
"system_id": 123456,
"timestamp": datetime.datetime(2020, 2, 13, 23, 1, 13, tzinfo=<UTC>),
}
```

`event_type`, being one of the key fields automations might be built from, can have the
following values:

* `camera_motion_detected`
* `doorbell_detected`
* `entry_detected`
* `motion_detected`

0 comments on commit bb94b7b

Please sign in to comment.