homebridge-winix-purifiers 1.4.2 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,6 +11,9 @@ another Homebridge plugin, but it did not work out of the box (11 open issues at
11
11
  update was in September 2020 (over 2 years ago at the time of writing), I decided to dive in and create my own plugin to
12
12
  support it. We can expand this to other Winix purifiers with support from other device owners!
13
13
 
14
+ ### Have an issue or question?
15
+ Please see the [FAQ](#faq) below for some common Q&A
16
+
14
17
  ## Features
15
18
 
16
19
  The following features are supported on the air purifiers:
@@ -124,4 +127,4 @@ follow [these instructions](https://github.com/banzalik/homebridge-winix-c545/wi
124
127
 
125
128
  ### Missing “Auto/Manual” switch in Home app?
126
129
 
127
- Please see [this issue](https://github.com/regaw-leinad/homebridge-winix-purifiers/issues/1) for more details.
130
+ Please see [this issue](https://github.com/regaw-leinad/homebridge-winix-purifiers/issues/1) for more details.
package/dist/accessory.js CHANGED
@@ -15,20 +15,25 @@ class WinixPurifierAccessory {
15
15
  this.lastWinixPoll = -1;
16
16
  this.services = [];
17
17
  // Create services
18
- this.purifier = this.registerService(new this.hap.Service.AirPurifier(deviceName));
19
18
  const purifierInfo = this.registerService(new this.hap.Service.AccessoryInformation());
20
19
  if (config.exposeAirQuality) {
21
- this.airQuality = this.registerService(new this.hap.Service.AirQualitySensor(`${deviceName} Air Quality`));
20
+ this.airQuality = this.registerService(new this.hap.Service.AirQualitySensor('Air Quality', 'air-quality-sensor')
21
+ .setCharacteristic(this.hap.Characteristic.ConfiguredName, 'Air Quality'));
22
22
  }
23
23
  if (config.exposePlasmawave) {
24
- this.plasmawave = this.registerService(new this.hap.Service.Switch(`${deviceName} Plasmawave`, 'plasmawave'));
24
+ this.plasmawave = this.registerService(new this.hap.Service.Switch('Plasmawave', 'switch-plasmawave')
25
+ .setCharacteristic(this.hap.Characteristic.ConfiguredName, 'Plasmawave'));
25
26
  }
26
27
  if (config.exposeAmbientLight) {
27
- this.ambientLight = this.registerService(new this.hap.Service.LightSensor(`${deviceName} Ambient Light`));
28
+ this.ambientLight = this.registerService(new this.hap.Service.LightSensor('Ambient Light', 'light-sensor-ambient')
29
+ .setCharacteristic(this.hap.Characteristic.ConfiguredName, 'Ambient Light'));
28
30
  }
29
31
  if (config.exposeAutoSwitch) {
30
- this.autoSwitch = this.registerService(new this.hap.Service.Switch(`${deviceName} Auto Mode`, 'auto'));
32
+ this.autoSwitch = this.registerService(new this.hap.Service.Switch('Auto Mode', 'switch-auto')
33
+ .setCharacteristic(this.hap.Characteristic.ConfiguredName, 'Auto Mode'));
31
34
  }
35
+ this.purifier = this.registerService(new this.hap.Service.AirPurifier(deviceName));
36
+ this.purifier.setPrimaryService(true);
32
37
  // Assign characteristics
33
38
  this.purifier.getCharacteristic(this.hap.Characteristic.Active)
34
39
  .onGet(this.getActiveState.bind(this))
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "displayName": "Winix Air Purifiers",
4
4
  "name": "homebridge-winix-purifiers",
5
- "version": "1.4.2",
5
+ "version": "1.4.4",
6
6
  "description": "Homebridge plugin for Winix air purifiers",
7
7
  "license": "Apache-2.0",
8
8
  "repository": {
@@ -48,7 +48,7 @@
48
48
  "@typescript-eslint/eslint-plugin": "^5.0.0",
49
49
  "@typescript-eslint/parser": "^5.0.0",
50
50
  "eslint": "^8.0.1",
51
- "homebridge": "^1.3.5",
51
+ "homebridge": "^1.7.0",
52
52
  "nodemon": "^2.0.13",
53
53
  "rimraf": "^3.0.2",
54
54
  "typescript": "^4.4.4"