mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-28 05:46:48 +00:00

* Standardized values in the example configuration Removed what appear to be an actual API key from the example configuration.yaml block. And, replaced with values as described in the [developer docs](https://developers.home-assistant.io/docs/en/documentation_standards.html#component-and-platform-pages) * Standardize example configuration-ecobee * Standardize example configuration-coinbase * Standardize example configuration-google assistant * Standardize example configuration-cloudflare * Standardize example configuration-cloudflare * Standardize example configuration-habitica * Standardize example configuration-ifttt * Standardize example configuration-openalpr * Standardize example configuration-multiple * Standardize example configuration-instapush * Standardize example configuration-llamalab * Standardize example configuration-notify * Standardize example configuration-mailgun * Standardize example configuration-MULTIPLE * Standardize example configuration-rtm * Standardize example configuration-spotcrime * Standardize example configuration-trafikverket * Standardize example configuration-uk transport * Standardize example configuration-wunderground * Standardize example configuration-wsdot * Standardize example configuration-telegram * Standardize example configuration-tts * Standardize example configuration-tts, vultr * Replace email entry * Replace IP address * Place email address
81 lines
2.2 KiB
Markdown
81 lines
2.2 KiB
Markdown
---
|
|
layout: page
|
|
title: "Spot Crime"
|
|
description: "Instructions on how to integrate spotcrime.com into Home Assistant."
|
|
date: 2018-02-16 9:30
|
|
sidebar: true
|
|
comments: false
|
|
sharing: true
|
|
footer: true
|
|
ha_category: Social
|
|
ha_release: 0.65
|
|
ha_iot_class: "Cloud Polling"
|
|
---
|
|
|
|
The `spotcrime` sensor allows one to track reported incidents occurring in a given area. Incidents include anything reported to [Spot Crime](http://spotcrime.com). Your regional emergency services may or may not report data. The sensor defaults to counting incidents within one day, but can be customized via configuration.yaml.
|
|
|
|
## {% linkable_title Setup %}
|
|
|
|
You will need to request an API key from [Spotcrime](mailto:pyrrhus@spotcrime.com).
|
|
|
|
## {% linkable_title Configuration %}
|
|
|
|
To enable this sensor, add the following lines to your `configuration.yaml`. Your `radius` should be of sufficient size to capture incidents in your area. 0.01 = 1 mile.
|
|
|
|
```yaml
|
|
sensor:
|
|
- platform: spotcrime
|
|
name: NAME
|
|
radius: SEARCH_RADIUS
|
|
api_key: YOUR_API_KEY
|
|
```
|
|
|
|
{% configuration %}
|
|
name:
|
|
description: Name the sensor what you'd like.
|
|
required: true
|
|
type: string
|
|
radius:
|
|
description: Radius you'd like to search within. 0.01 = 1 mile.
|
|
required: true
|
|
type: float
|
|
api_key:
|
|
description: The API key to access the service.
|
|
required: true
|
|
type: string
|
|
days:
|
|
description: Number of days you'd like see to crime statistics for.
|
|
required: false
|
|
type: integer
|
|
include:
|
|
description: Event types you want statistics for.
|
|
required: false
|
|
type: list
|
|
exclude:
|
|
description: Event types to ignore statistics for.
|
|
required: false
|
|
type: list
|
|
{% endconfiguration %}
|
|
|
|
## {% linkable_title Notes %}
|
|
|
|
### {% linkable_title Incident Types %}
|
|
|
|
You can explicitly include or exclude incident types. Specifying `include`s restricts the incidents to those types. Specifying `exclude`s will return all incident types except those specified.
|
|
|
|
These incident types are available:
|
|
|
|
- Arrest
|
|
- Arson
|
|
- Assault
|
|
- Burglary
|
|
- Robbery
|
|
- Shooting
|
|
- Theft
|
|
- Vandalism
|
|
- Other
|
|
|
|
### {% linkable_title Events %}
|
|
|
|
The `crimealerts` sensor fires a `crimealerts_incident` event when a new incident is detected, including the type, time, and location of the incident.
|