Add WUnderground WeatherProvider with Zimmerman PWS support

This commit is contained in:
Matthew Oslan
2019-06-28 16:02:35 -04:00
parent dc171ebe68
commit 5f35b0410c
6 changed files with 99 additions and 13 deletions

View File

@@ -1,6 +1,9 @@
/** Geographic coordinates. The 1st element is the latitude, and the 2nd element is the longitude. */
export type GeoCoordinates = [number, number];
/** A PWS ID and API key. */
export type PWS = { id: string, apiKey: string };
export interface TimeData {
/** The UTC offset, in minutes. This uses POSIX offsets, which are the negation of typically used offsets
* (https://github.com/eggert/tz/blob/2017b/etcetera#L36-L42).
@@ -71,4 +74,4 @@ export interface ZimmermanWateringData extends BaseWateringData {
raining: boolean;
}
export type WeatherProviderId = "OWM" | "DarkSky" | "local" | "mock";
export type WeatherProviderId = "OWM" | "DarkSky" | "local" | "mock" | "WUnderground";