Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nbonamy/weather-gov-text
Generates text weather updates from weather.gov API
https://github.com/nbonamy/weather-gov-text
home-assistant home-automation text-to-speech tts tts-api weather weather-api weather-forecast weather-gov weather-gov-api
Last synced: 2 days ago
JSON representation
Generates text weather updates from weather.gov API
- Host: GitHub
- URL: https://github.com/nbonamy/weather-gov-text
- Owner: nbonamy
- License: apache-2.0
- Created: 2023-07-12T14:23:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-15T16:40:39.000Z (over 1 year ago)
- Last Synced: 2024-10-12T18:07:28.987Z (about 1 month ago)
- Topics: home-assistant, home-automation, text-to-speech, tts, tts-api, weather, weather-api, weather-forecast, weather-gov, weather-gov-api
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# weather-gov-text
Generates text weather forecasts from weather.gov API.The goal is to provide a text that can be fed to a TTS system for integration into a home/smart assistant for instance.
Example of text created:
> Showers And Thunderstorms. Temperature: 22°C. Chance of precipitation: 91%. Wind speed: 10 mph.
## Installation
`npm install`
## Configuration
You need to create a `config.yml` file to specify your location. Example:
```yaml
location:
gridId: LOT
gridX: 76
gridY: 73
```You can obtain this information by making a call to `https://api.weather.gov/points/41.8781,-87.6298` (replace latitude, longitudfe with yours).
Weather.gov temperatures are in Farenheit. If you want them to be converted in Celsius, add this to `config.yml`:
```yaml
temperature:
unit: C
```You can also configure how the text will be built with `parts` options:
| Name | Options | Default | |
|-----------------|--------------------|---------|---------------------------------------------------|
| `forecast` | `short`/`detailed` | `short` | Switch between shortForecast and detailedForecast |
| `temperature` | `true`/`false` | `true` | Include temperature |
| `precipitation` | `true`/`false` | `true` | Include precipitation |
| `wind` | `true`/`false` | `true` | Include wind |Example:
```yaml
parts:
forecast: detailed
precipitation: false
```## Endpoints
### `/daily/`
Where `day` can be:
- today
- tonight
- tomorrow
- tomorrow night
- any day name (monday, tuesday...)
- any day name (monday, tuesday...) followed by tonight### `/hourly/`
Where `hour` can be:
- now
- a time of the day (9 or 10pm)
- an offset if number of hours (+1 or +10)