Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
fix: use numbers instead of hap constants in air quality levels
Browse files Browse the repository at this point in the history
  • Loading branch information
dhayab committed Oct 12, 2019
1 parent 7c60e52 commit a00c908
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ let Characteristic: typeof Hap.Characteristic;

const DEFAULT_BATTERY_LOW_LEVEL = 10;
const DEFAULT_AIR_QUALITY_LEVELS: AirQualityLevel[] = [
{ level: Hap.Characteristic.AirQuality.EXCELLENT, threshold: 350, label: 'Excellent' },
{ level: Hap.Characteristic.AirQuality.GOOD, threshold: 1000, label: 'Good' },
{ level: Hap.Characteristic.AirQuality.FAIR, threshold: 2500, label: 'Fair' },
{ level: Hap.Characteristic.AirQuality.INFERIOR, threshold: 5000, label: 'Inferior' },
{ level: Hap.Characteristic.AirQuality.POOR, threshold: Number.MAX_SAFE_INTEGER, label: 'Poor' },
{ level: 1, threshold: 350, label: 'Excellent' },
{ level: 2, threshold: 1000, label: 'Good' },
{ level: 3, threshold: 2500, label: 'Fair' },
{ level: 4, threshold: 5000, label: 'Inferior' },
{ level: 5, threshold: Number.MAX_SAFE_INTEGER, label: 'Poor' },
];

export default function (homebridge: Homebridge) {
Expand Down

0 comments on commit a00c908

Please sign in to comment.