-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeoJSON platform #6316
Merged
MartinHjelmare
merged 2 commits into
home-assistant:next
from
exxamalte:geo_location_geojson_platform
Sep 22, 2018
Merged
GeoJSON platform #6316
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
layout: page | ||
title: "GeoJSON Events" | ||
description: "Instructions on how to integrate GeoJSON feeds into Home Assistant." | ||
date: 2018-09-19 08:00 | ||
sidebar: true | ||
comments: false | ||
sharing: true | ||
footer: true | ||
logo: geo_location.png | ||
ha_category: Geo Location | ||
ha_release: "0.79" | ||
--- | ||
|
||
The `geo_json_events` platform lets you integrate GeoJSON feeds. It retrieves events from a feed and shows information of those events filtered by distance to Home Assistant's location. | ||
All entries in the GeoJSON feed must define a `geometry` which typically is a point or polygon with geo coordinates. In addition, this platform will look for a `title` key in the entry's `properties` and use that as the entity's name. | ||
|
||
Entities are generated, updated and removed automatically with each update from the GeoJSON feed. Each entity defines latitude and longitude and will be shown on the map automatically. The distance in kilometers is available as the state of each entity. | ||
|
||
## {% linkable_title Configuration %} | ||
|
||
To integrate a GeoJSON feed, add the following lines to your `configuration.yaml`. This is an example configuration showing [earthquake data provided by the U.S. Geological Survey](https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php). | ||
|
||
```yaml | ||
# Example configuration.yaml entry | ||
geo_location: | ||
- platform: geo_json_events | ||
url: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson | ||
``` | ||
|
||
{% configuration %} | ||
url: | ||
description: Full URL of the GeoJSON feed. | ||
required: true | ||
type: string | ||
radius: | ||
description: The distance in kilometers around the Home Assistant's coordinates in which events are considered. | ||
required: false | ||
type: string | ||
default: 20km | ||
scan_interval: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We usually don't mention this, since it's a standard option for platforms. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I'll mention the default value of 5 minute in the description instead. |
||
description: Defines the update interval of the feed. | ||
required: false | ||
type: interval | ||
default: 5 minutes | ||
{% endconfiguration %} | ||
|
||
## {% linkable_title Advanced Configuration Example %} | ||
|
||
When integrating several GeoJSON feeds, it may be useful to distinguish the entities of different feeds. The easiest way to do that is by defining an [`entity_namespace`](/docs/configuration/platform_options/#entity-namespace/) for each platform which will prefix each entity ID with the defined value. | ||
|
||
```yaml | ||
# Example configuration.yaml entry | ||
geo_location: | ||
- platform: geo_json_events | ||
url: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson | ||
radius: 250 | ||
entity_namespace: 'usgs_earthquakes' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a
ha_iot_class
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added "Cloud Polling"