Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-air

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-air - npm Package Compare versions

Comparing version 1.0.0-beta.15 to 1.0.0-beta.16

46

dist/devices/airqualitysensor.js

@@ -70,25 +70,27 @@ import { interval } from 'rxjs';

const param = provider === 'airnow' ? this.deviceStatus.find((p) => p.ParameterName === pollutant) : this.deviceStatus.iaqi[pollutant]?.v;
const aqi = provider === 'airnow' ? Number.parseFloat(param.AQI.toString()) : Number.parseFloat(param);
if (aqi !== undefined) {
switch (pollutant.toLowerCase()) {
case 'o3':
this.AirQualitySensor.OzoneDensity = aqi;
break;
case 'pm2.5':
this.AirQualitySensor.PM2_5Density = aqi;
break;
case 'pm10':
this.AirQualitySensor.PM10Density = aqi;
break;
case 'no2':
this.AirQualitySensor.NitrogenDioxideDensity = aqi;
break;
case 'so2':
this.AirQualitySensor.SulphurDioxideDensity = aqi;
break;
case 'co':
this.AirQualitySensor.CarbonMonoxideLevel = aqi;
break;
if (param !== undefined) {
const aqi = provider === 'airnow' ? Number.parseFloat(param.AQI.toString()) : Number.parseFloat(param);
if (!Number.isNaN(aqi)) {
switch (pollutant.toLowerCase()) {
case 'o3':
this.AirQualitySensor.OzoneDensity = aqi;
break;
case 'pm2.5':
this.AirQualitySensor.PM2_5Density = aqi;
break;
case 'pm10':
this.AirQualitySensor.PM10Density = aqi;
break;
case 'no2':
this.AirQualitySensor.NitrogenDioxideDensity = aqi;
break;
case 'so2':
this.AirQualitySensor.SulphurDioxideDensity = aqi;
break;
case 'co':
this.AirQualitySensor.CarbonMonoxideLevel = aqi;
break;
}
this.AirQualitySensor.AirQuality = HomeKitAQI(Math.max(0, aqi));
}
this.AirQualitySensor.AirQuality = HomeKitAQI(Math.max(0, aqi));
}

@@ -95,0 +97,0 @@ });

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "1.0.0-beta.15",
"version": "1.0.0-beta.16",
"description": "The AirNow plugin allows you to monitor the current AirQuality for your Zip Code from HomeKit and Siri.",

@@ -8,0 +8,0 @@ "author": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc