mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Update sensor.spotcrime.markdown (#4840)
* Update sensor.spotcrime.markdown Changes the documentation to reflect the user supplied API key requirement. * Change description and sample Added optional keys to description and removed optional keys from sample
This commit is contained in:
parent
5a5d9c8d4e
commit
6ee7e31359
@ -8,13 +8,13 @@ comments: false
|
|||||||
sharing: true
|
sharing: true
|
||||||
footer: true
|
footer: true
|
||||||
ha_category: Sensor
|
ha_category: Sensor
|
||||||
ha_release: 0.64
|
ha_release: 0.65
|
||||||
ha_iot_class: "Cloud Polling"
|
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.
|
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.
|
||||||
|
|
||||||
## Configuration
|
You will need to request an API key from [Spotcrime](mailto:pyrrhus@spotcrime.com).
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
@ -23,23 +23,39 @@ sensor:
|
|||||||
- platform: spotcrime
|
- platform: spotcrime
|
||||||
name: <any name>
|
name: <any name>
|
||||||
radius: <your radius>
|
radius: <your radius>
|
||||||
days: <your days>
|
api_key: <"your_api_key_here">
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration options for the Crime Reports Sensor:
|
{% 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: int
|
||||||
|
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 %}
|
||||||
|
|
||||||
- **name** (*Required*): Name the sensor whatever you want.
|
## {% linkable_title Notes %}
|
||||||
- **radius** (*Required*): Radius in miles.
|
|
||||||
- **days** (*Optional*): Defaults to 1 day.
|
|
||||||
- **latitude** (*Optional*): Defaults to your home zone latitude.
|
|
||||||
- **longitude** (*Optional*): Defaults to your home zone longitude.
|
|
||||||
- **include** (*Optional*): List of incident types to include.
|
|
||||||
- **exclude** (*Optional*): List of incident types to exclude.
|
|
||||||
|
|
||||||
|
### {% linkable_title Incident Types %}
|
||||||
## Notes
|
|
||||||
|
|
||||||
### 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.
|
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.
|
||||||
|
|
||||||
@ -55,6 +71,6 @@ These incident types are available:
|
|||||||
- Vandalism
|
- Vandalism
|
||||||
- Other
|
- Other
|
||||||
|
|
||||||
### Events
|
### {% 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.
|
The `crimealerts` sensor fires a `crimealerts_incident` event when a new incident is detected, including the type, time, and location of the incident.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user