UNPKG

@homebridge-plugins/homebridge-air

Version:

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

34 lines 874 B
/** * This is the name of the platform that users will use to register the plugin in the Homebridge config.json */ export const PLATFORM_NAME = 'Air'; /** * This must match the name of your plugin as defined the package.json */ export const PLUGIN_NAME = '@homebridge-plugins/homebridge-air'; /** * This must match the name of your plugin as defined the package.json */ export const AirNowUrl = 'https://www.airnowapi.org/aq/observation/'; export const AqicnUrl = 'http://api.waqi.info/feed/'; export function HomeKitAQI(aqi) { if (aqi === undefined || aqi < 0) { return 0; } else if (aqi <= 50) { return 1; } else if (aqi <= 100) { return 2; } else if (aqi <= 150) { return 3; } else if (aqi <= 200) { return 4; } else { return 5; } } //# sourceMappingURL=settings.js.map