From 704bda6de447430032730b30d9d1c87c2eb64c36 Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Sun, 17 May 2020 12:07:31 -0700 Subject: [PATCH] fixing typescript --- src/puckPlatformAccessory.ts | 10 ---------- src/ventPlatformAccessory.ts | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/puckPlatformAccessory.ts b/src/puckPlatformAccessory.ts index 6b8a1f5..35f884f 100644 --- a/src/puckPlatformAccessory.ts +++ b/src/puckPlatformAccessory.ts @@ -6,7 +6,6 @@ import type { import {FlairPlatform} from './platform'; import {Puck} from 'flair-api-ts/lib/client/models'; import Client from 'flair-api-ts/lib/client'; -import {Pressure, PressureSensor} from './Pressure'; import {getRandomIntInclusive} from './utils'; /** @@ -18,7 +17,6 @@ export class FlairPuckPlatformAccessory { private temperatureService: Service; private humidityService: Service; private accessoryInformationService: Service; - private pressureService: Service; private client: Client; private puck: Puck; @@ -54,13 +52,6 @@ export class FlairPuckPlatformAccessory { this.humidityService.setCharacteristic(this.platform.Characteristic.CurrentRelativeHumidity, this.puck.currentHumidity); this.temperatureService.addLinkedService(this.humidityService); - //Add our custom pressure sensor - this.pressureService = this.accessory.getService(PressureSensor) - ?? this.accessory.addService(PressureSensor); - this.pressureService.setCharacteristic(this.platform.Characteristic.Name, accessory.context.device.name); - this.pressureService.setCharacteristic(Pressure, this.puck.currentRoomPressure); - this.temperatureService.addLinkedService(this.pressureService); - setInterval(async () => { await this.getNewPuckReadings(); }, (platform.config.pollInterval + getRandomIntInclusive(1, 20)) * 1000); @@ -87,7 +78,6 @@ export class FlairPuckPlatformAccessory { // push the new value to HomeKit this.temperatureService.updateCharacteristic(this.platform.Characteristic.CurrentTemperature, this.puck.currentTemperatureC); this.humidityService.updateCharacteristic(this.platform.Characteristic.CurrentRelativeHumidity, this.puck.currentHumidity); - this.pressureService.updateCharacteristic(Pressure, this.puck.currentRoomPressure); this.accessory.getService(this.platform.Service.AccessoryInformation)! .updateCharacteristic(this.platform.Characteristic.FirmwareRevision, this.puck.firmwareVersionS); diff --git a/src/ventPlatformAccessory.ts b/src/ventPlatformAccessory.ts index 8c8546d..de8fc26 100644 --- a/src/ventPlatformAccessory.ts +++ b/src/ventPlatformAccessory.ts @@ -191,7 +191,7 @@ export class FlairVentPlatformAccessory { this.platform.Characteristic.CurrentTemperature, this.vent.ductTemperatureC, ); - + // We fake a vent as a window covering. switch (this.accessoryType) { case AccessoryType.WindowCovering: