Voice Assistant Skill Weather

This summer I am making a personal voice assistant, because I like the idea of Alexa but I don't like volunteering to be spied on. Read the setup Post here.

Today's skill is the weather. Supposedly that's the most commonly asked question for assistants, according to a 3-second google search I did with no further fact-checking. I'm not sure I will find the skill itself particularly useful, but it establishes the pattern for how I will build skills that require an external API call and location data generally.

I chose to go with Open Meteo for its privacy-first approach and its simple API. I want to sign up for as few API keys and developer accounts as possible for this project (although I know I will have to for some skills like lights and calendar and so on). If a location name is given, the skill will try to fetch data from that location. If no location is provided, it will look for a default location in the environment variables. I made this settable via voice because why not.

This skill was very straightforward, so I took the opportunity to start including unit testing.

I don't anticipate using this skill that much, but it was a really low-hanging fruit to build, and it establishes the pattern for how I will build skills that require external API calls and location data generally.