Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MikeChristianson/1006b926c2a401252a087bf1d18e133f to your computer and use it in GitHub Desktop.
Save MikeChristianson/1006b926c2a401252a087bf1d18e133f to your computer and use it in GitHub Desktop.
National Weather Service forecast sensor for Home Assistant
# Rather than create a whole new hass component, this minimal `rest` sensor configuration is sufficient for a
# high-quality National Weather Service point forecast.
# See https://forecast-v3.weather.gov/documentation for details on this point-based GeoJSON forecast and more.
# Thanks to the National Weather Service for their efforts providing timely weather data to protect life and property.
sensor Forecast:
- platform: rest
name: Forecast
resource: https://api.weather.gov/points/[LATITUDE],[LONGITUDE]/forecast # substitute your EPSG:4326 lat/long
value_template: "{{ value_json.properties.periods[0].name }}: {{ value_json.properties.periods[0].detailedForecast }}"
headers:
User-Agent: "Home Assistant"
Accept: application/geo+json
@MikeChristianson
Copy link
Author

screen shot 2018-02-18 at 2 18 03 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment