UNPKG

@homebridge-plugins/homebridge-air

Version:

The AirNow plugin allows you to monitor the current AirQuality for your Zip Code from HomeKit and Siri.

103 lines 2.6 kB
import type { PlatformConfig } from 'homebridge'; /** * This is the name of the platform that users will use to register the plugin in the Homebridge config.json */ export declare const PLATFORM_NAME = "Air"; /** * This must match the name of your plugin as defined the package.json */ export declare const PLUGIN_NAME = "@homebridge-plugins/homebridge-air"; /** * This must match the name of your plugin as defined the package.json */ export declare const AirNowUrl = "https://www.airnowapi.org/aq/observation/"; export declare const AqicnUrl = "http://api.waqi.info/feed/"; export interface AirPlatformConfig extends PlatformConfig { name?: string; devices?: devicesConfig[]; options?: options; } export interface devicesConfig { provider: string; apiKey?: string; latitude?: number; longitude?: number; city?: string; state?: string; zipCode?: string; distance?: string; firmware: string; refreshRate?: number; updateRate?: number; pushRate?: number; logging?: string; hide_device?: boolean; } export interface options { allowInvalidCharacters?: boolean; refreshRate?: number; updateRate?: number; pushRate?: number; logging?: string; } interface Category { Number: number; Name: string; } interface AirNowAirQualityData { DateObserved: string; HourObserved: number; LocalTimeZone: string; ReportingArea: string; StateCode: string; Latitude: number; Longitude: number; ParameterName: string; AQI: number; Category: Category; } export type AirNowAirQualityDataArray = AirNowAirQualityData[]; export interface AqicnData { status: string; data: { idx: number; aqi: number; time: { s: string; tz: string; }; city: { name: string; geo: [number, number]; url: string; }; attributions: { name: string; url: string; }[]; iaqi: { pm25: { v: number; }; }; forecast: { daily: { pm25: { v: number; }[]; pm10: { v: number; }[]; o3: { v: number; }[]; uvi: { v: number; }[]; }; }; }; } export declare function HomeKitAQI(aqi: number | undefined): number; export {}; //# sourceMappingURL=settings.d.ts.map