@switchbot/homebridge-switchbot
Advanced tools
Comparing version 0.1.2-beta.30 to 0.1.2-beta.31
@@ -307,2 +307,3 @@ "use strict"; | ||
this.service.updateCharacteristic(this.platform.Characteristic.On, this.SwitchOn); | ||
this.platform.device(`updateCharacteristic On: ${this.SwitchOn}`); | ||
} | ||
@@ -314,2 +315,3 @@ if (this.OutletInUse === undefined || this.platform.config.options?.bot?.switch) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.OutletInUse, this.OutletInUse); | ||
this.platform.device(`updateCharacteristic On: ${this.OutletInUse}, Switch: ${this.platform.config.options?.bot?.switch}`); | ||
} | ||
@@ -316,0 +318,0 @@ } |
@@ -160,2 +160,3 @@ "use strict"; | ||
this.service.updateCharacteristic(this.platform.Characteristic.On, this.On); | ||
this.platform.device(`updateCharacteristic On: ${this.On}`); | ||
} | ||
@@ -167,2 +168,3 @@ if (this.Brightness === undefined) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.Brightness, this.Brightness); | ||
this.platform.device(`updateCharacteristic Brightness: ${this.Brightness}`); | ||
} | ||
@@ -174,2 +176,3 @@ if (this.ColorTemperature === undefined) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.Brightness, this.ColorTemperature); | ||
this.platform.debug(`updateCharacteristic ColorTemperature: ${this.ColorTemperature}`); | ||
} | ||
@@ -176,0 +179,0 @@ } |
@@ -182,2 +182,3 @@ "use strict"; | ||
this.service.updateCharacteristic(this.platform.Characteristic.ContactSensorState, this.ContactSensorState); | ||
this.platform.device(`updateCharacteristic ContactSensorState: ${this.ContactSensorState}`); | ||
} | ||
@@ -189,2 +190,3 @@ if (this.MotionDetected === undefined) { | ||
this.motionService.updateCharacteristic(this.platform.Characteristic.MotionDetected, this.MotionDetected); | ||
this.platform.device(`updateCharacteristic MotionDetected: ${this.MotionDetected}`); | ||
} | ||
@@ -191,0 +193,0 @@ } |
@@ -289,2 +289,3 @@ "use strict"; | ||
this.service.updateCharacteristic(this.platform.Characteristic.CurrentPosition, this.CurrentPosition); | ||
this.platform.device(`updateCharacteristic CurrentPosition: ${this.CurrentPosition}`); | ||
} | ||
@@ -296,2 +297,3 @@ if (this.PositionState === undefined) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.PositionState, this.PositionState); | ||
this.platform.device(`updateCharacteristic PositionState: ${this.PositionState}`); | ||
} | ||
@@ -303,2 +305,3 @@ if (this.TargetPosition === undefined) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.TargetPosition, this.TargetPosition); | ||
this.platform.device(`updateCharacteristic TargetPosition: ${this.TargetPosition}`); | ||
} | ||
@@ -310,2 +313,3 @@ if (this.CurrentAmbientLightLevel === undefined) { | ||
this.lightSensorService.updateCharacteristic(this.platform.Characteristic.CurrentAmbientLightLevel, this.CurrentAmbientLightLevel); | ||
this.platform.device(`updateCharacteristic CurrentAmbientLightLevel: ${this.CurrentAmbientLightLevel}`); | ||
} | ||
@@ -312,0 +316,0 @@ } |
@@ -292,22 +292,50 @@ "use strict"; | ||
updateHomeKitCharacteristics() { | ||
if (this.CurrentRelativeHumidity !== undefined) { | ||
if (this.CurrentRelativeHumidity === undefined) { | ||
this.platform.debug(`CurrentRelativeHumidity: ${this.CurrentRelativeHumidity}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.CurrentRelativeHumidity, this.CurrentRelativeHumidity); | ||
this.platform.device(`updateCharacteristic CurrentRelativeHumidity: ${this.CurrentRelativeHumidity}`); | ||
} | ||
if (this.WaterLevel !== undefined) { | ||
if (this.WaterLevel === undefined) { | ||
this.platform.debug(`WaterLevel: ${this.WaterLevel}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.WaterLevel, this.WaterLevel); | ||
this.platform.device(`updateCharacteristic WaterLevel: ${this.WaterLevel}`); | ||
} | ||
if (this.CurrentHumidifierDehumidifierState !== undefined) { | ||
if (this.CurrentHumidifierDehumidifierState === undefined) { | ||
this.platform.debug(`CurrentHumidifierDehumidifierState: ${this.CurrentHumidifierDehumidifierState}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.CurrentHumidifierDehumidifierState, this.CurrentHumidifierDehumidifierState); | ||
this.platform.device(`updateCharacteristic CurrentHumidifierDehumidifierState: ${this.CurrentHumidifierDehumidifierState}`); | ||
} | ||
if (this.TargetHumidifierDehumidifierState !== undefined) { | ||
if (this.TargetHumidifierDehumidifierState === undefined) { | ||
this.platform.debug(`TargetHumidifierDehumidifierState: ${this.TargetHumidifierDehumidifierState}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.TargetHumidifierDehumidifierState, this.TargetHumidifierDehumidifierState); | ||
this.platform.device(`updateCharacteristic TargetHumidifierDehumidifierState: ${this.TargetHumidifierDehumidifierState}`); | ||
} | ||
if (this.Active !== undefined) { | ||
if (this.Active === undefined) { | ||
this.platform.debug(`Active: ${this.Active}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.Active, this.Active); | ||
this.platform.device(`updateCharacteristic Active: ${this.Active}`); | ||
} | ||
if (this.RelativeHumidityHumidifierThreshold !== undefined) { | ||
if (this.RelativeHumidityHumidifierThreshold === undefined) { | ||
this.platform.debug(`RelativeHumidityHumidifierThreshold: ${this.RelativeHumidityHumidifierThreshold}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.RelativeHumidityHumidifierThreshold, this.RelativeHumidityHumidifierThreshold); | ||
this.platform.device(`updateCharacteristic RelativeHumidityHumidifierThreshold: ${this.RelativeHumidityHumidifierThreshold}`); | ||
} | ||
if (!this.platform.config.options?.humidifier?.hide_temperature && this.CurrentTemperature !== undefined) { | ||
if (this.platform.config.options?.humidifier?.hide_temperature && this.CurrentTemperature === undefined) { | ||
this.platform.debug(`CurrentTemperature: ${this.CurrentTemperature}`); | ||
} | ||
else { | ||
this.temperatureservice.updateCharacteristic(this.platform.Characteristic.CurrentTemperature, this.CurrentTemperature); | ||
this.platform.device(`updateCharacteristic CurrentTemperature: ${this.CurrentTemperature}`); | ||
} | ||
@@ -314,0 +342,0 @@ } |
@@ -182,7 +182,15 @@ "use strict"; | ||
updateHomeKitCharacteristics() { | ||
if (this.On !== undefined) { | ||
if (this.On === undefined) { | ||
this.platform.debug(`On: ${this.On}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.On, this.On); | ||
this.platform.device(`updateCharacteristic On: ${this.On}`); | ||
} | ||
if (this.OutletInUse !== undefined) { | ||
if (this.OutletInUse === undefined) { | ||
this.platform.debug(`OutletInUse: ${this.OutletInUse}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.OutletInUse, this.OutletInUse); | ||
this.platform.device(`updateCharacteristic OutletInUse: ${this.OutletInUse}`); | ||
} | ||
@@ -189,0 +197,0 @@ } |
@@ -269,18 +269,28 @@ "use strict"; | ||
if (this.StatusLowBattery === undefined) { | ||
this.platform.debug(`ContactSensorState: ${this.StatusLowBattery}`); | ||
this.platform.debug(`StatusLowBattery: ${this.StatusLowBattery}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.StatusLowBattery, this.StatusLowBattery); | ||
this.platform.device(`updateCharacteristic StatusLowBattery: ${this.StatusLowBattery}`); | ||
} | ||
if (this.BatteryLevel === undefined) { | ||
this.platform.debug(`ContactSensorState: ${this.BatteryLevel}`); | ||
this.platform.debug(`BatteryLevel: ${this.BatteryLevel}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.BatteryLevel, this.BatteryLevel); | ||
this.platform.device(`updateCharacteristic BatteryLevel: ${this.BatteryLevel}`); | ||
} | ||
if (!this.platform.config.options?.meter?.hide_humidity && (this.CurrentRelativeHumidity !== undefined)) { | ||
if (this.platform.config.options?.meter?.hide_humidity && this.CurrentRelativeHumidity === undefined) { | ||
this.platform.debug(`CurrentRelativeHumidity: ${this.CurrentRelativeHumidity}`); | ||
} | ||
else { | ||
this.humidityservice?.updateCharacteristic(this.platform.Characteristic.CurrentRelativeHumidity, this.CurrentRelativeHumidity); | ||
this.platform.device(`updateCharacteristic CurrentRelativeHumidity: ${this.CurrentRelativeHumidity}`); | ||
} | ||
if (!this.platform.config.options?.meter?.hide_temperature && (this.CurrentTemperature !== undefined)) { | ||
if (this.platform.config.options?.meter?.hide_temperature && this.CurrentTemperature === undefined) { | ||
this.platform.debug(`CurrentTemperature: ${this.CurrentTemperature}`); | ||
} | ||
else { | ||
this.temperatureservice?.updateCharacteristic(this.platform.Characteristic.CurrentTemperature, this.CurrentTemperature); | ||
this.platform.device(`updateCharacteristic CurrentTemperature: ${this.CurrentTemperature}`); | ||
} | ||
@@ -287,0 +297,0 @@ } |
@@ -166,2 +166,3 @@ "use strict"; | ||
this.service.updateCharacteristic(this.platform.Characteristic.MotionDetected, this.MotionDetected); | ||
this.platform.device(`updateCharacteristic MotionDetected: ${this.MotionDetected}`); | ||
} | ||
@@ -168,0 +169,0 @@ } |
@@ -184,7 +184,15 @@ "use strict"; | ||
updateHomeKitCharacteristics() { | ||
if (this.On !== undefined) { | ||
if (this.On === undefined) { | ||
this.platform.debug(`On: ${this.On}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.On, this.On); | ||
this.platform.device(`updateCharacteristic On: ${this.On}`); | ||
} | ||
if (this.OutletInUse !== undefined) { | ||
if (this.OutletInUse === undefined) { | ||
this.platform.debug(`OutletInUse: ${this.OutletInUse}`); | ||
} | ||
else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.OutletInUse, this.OutletInUse); | ||
this.platform.device(`updateCharacteristic OutletInUse: ${this.OutletInUse}`); | ||
} | ||
@@ -191,0 +199,0 @@ } |
{ | ||
"displayName": "Homebridge SwitchBot", | ||
"name": "@switchbot/homebridge-switchbot", | ||
"version": "0.1.2-beta.30", | ||
"version": "0.1.2-beta.31", | ||
"description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.", | ||
@@ -6,0 +6,0 @@ "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)", |
@@ -358,2 +358,3 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
this.service.updateCharacteristic(this.platform.Characteristic.On, this.SwitchOn); | ||
this.platform.device(`updateCharacteristic On: ${this.SwitchOn}`); | ||
} | ||
@@ -364,2 +365,3 @@ if (this.OutletInUse === undefined || this.platform.config.options?.bot?.switch) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.OutletInUse, this.OutletInUse); | ||
this.platform.device(`updateCharacteristic On: ${this.OutletInUse}, Switch: ${this.platform.config.options?.bot?.switch}`); | ||
} | ||
@@ -366,0 +368,0 @@ } |
@@ -218,2 +218,3 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
this.service.updateCharacteristic(this.platform.Characteristic.On, this.On); | ||
this.platform.device(`updateCharacteristic On: ${this.On}`); | ||
} | ||
@@ -224,2 +225,3 @@ if (this.Brightness === undefined) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.Brightness, this.Brightness); | ||
this.platform.device(`updateCharacteristic Brightness: ${this.Brightness}`); | ||
} | ||
@@ -230,2 +232,3 @@ if (this.ColorTemperature === undefined) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.Brightness, this.ColorTemperature); | ||
this.platform.debug(`updateCharacteristic ColorTemperature: ${this.ColorTemperature}`); | ||
} | ||
@@ -232,0 +235,0 @@ } |
@@ -225,2 +225,3 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
this.service.updateCharacteristic(this.platform.Characteristic.ContactSensorState, this.ContactSensorState); | ||
this.platform.device(`updateCharacteristic ContactSensorState: ${this.ContactSensorState}`); | ||
} | ||
@@ -231,2 +232,3 @@ if (this.MotionDetected === undefined) { | ||
this.motionService.updateCharacteristic(this.platform.Characteristic.MotionDetected, this.MotionDetected); | ||
this.platform.device(`updateCharacteristic MotionDetected: ${this.MotionDetected}`); | ||
} | ||
@@ -233,0 +235,0 @@ } |
@@ -374,2 +374,3 @@ /* eslint-disable @typescript-eslint/no-var-requires */ | ||
this.service.updateCharacteristic(this.platform.Characteristic.CurrentPosition, this.CurrentPosition); | ||
this.platform.device(`updateCharacteristic CurrentPosition: ${this.CurrentPosition}`); | ||
} | ||
@@ -380,2 +381,3 @@ if (this.PositionState === undefined) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.PositionState, this.PositionState); | ||
this.platform.device(`updateCharacteristic PositionState: ${this.PositionState}`); | ||
} | ||
@@ -386,2 +388,3 @@ if (this.TargetPosition === undefined) { | ||
this.service.updateCharacteristic(this.platform.Characteristic.TargetPosition, this.TargetPosition); | ||
this.platform.device(`updateCharacteristic TargetPosition: ${this.TargetPosition}`); | ||
} | ||
@@ -392,2 +395,3 @@ if (this.CurrentAmbientLightLevel === undefined) { | ||
this.lightSensorService.updateCharacteristic(this.platform.Characteristic.CurrentAmbientLightLevel, this.CurrentAmbientLightLevel); | ||
this.platform.device(`updateCharacteristic CurrentAmbientLightLevel: ${this.CurrentAmbientLightLevel}`); | ||
} | ||
@@ -394,0 +398,0 @@ } |
@@ -367,37 +367,43 @@ import { Service, PlatformAccessory, CharacteristicValue } from 'homebridge'; | ||
updateHomeKitCharacteristics() { | ||
if (this.CurrentRelativeHumidity !== undefined) { | ||
this.service.updateCharacteristic( | ||
this.platform.Characteristic.CurrentRelativeHumidity, | ||
this.CurrentRelativeHumidity, | ||
); | ||
if (this.CurrentRelativeHumidity === undefined) { | ||
this.platform.debug(`CurrentRelativeHumidity: ${this.CurrentRelativeHumidity}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.CurrentRelativeHumidity, this.CurrentRelativeHumidity); | ||
this.platform.device(`updateCharacteristic CurrentRelativeHumidity: ${this.CurrentRelativeHumidity}`); | ||
} | ||
if (this.WaterLevel !== undefined) { | ||
if (this.WaterLevel === undefined) { | ||
this.platform.debug(`WaterLevel: ${this.WaterLevel}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.WaterLevel, this.WaterLevel); | ||
this.platform.device(`updateCharacteristic WaterLevel: ${this.WaterLevel}`); | ||
} | ||
if (this.CurrentHumidifierDehumidifierState !== undefined) { | ||
this.service.updateCharacteristic( | ||
this.platform.Characteristic.CurrentHumidifierDehumidifierState, | ||
this.CurrentHumidifierDehumidifierState, | ||
); | ||
if (this.CurrentHumidifierDehumidifierState === undefined) { | ||
this.platform.debug(`CurrentHumidifierDehumidifierState: ${this.CurrentHumidifierDehumidifierState}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.CurrentHumidifierDehumidifierState, this.CurrentHumidifierDehumidifierState); | ||
this.platform.device(`updateCharacteristic CurrentHumidifierDehumidifierState: ${this.CurrentHumidifierDehumidifierState}`); | ||
} | ||
if (this.TargetHumidifierDehumidifierState !== undefined) { | ||
this.service.updateCharacteristic( | ||
this.platform.Characteristic.TargetHumidifierDehumidifierState, | ||
this.TargetHumidifierDehumidifierState, | ||
); | ||
if (this.TargetHumidifierDehumidifierState === undefined) { | ||
this.platform.debug(`TargetHumidifierDehumidifierState: ${this.TargetHumidifierDehumidifierState}`); | ||
} else { | ||
this.service.updateCharacteristic( this.platform.Characteristic.TargetHumidifierDehumidifierState, this.TargetHumidifierDehumidifierState); | ||
this.platform.device(`updateCharacteristic TargetHumidifierDehumidifierState: ${this.TargetHumidifierDehumidifierState}`); | ||
} | ||
if (this.Active !== undefined) { | ||
if (this.Active === undefined) { | ||
this.platform.debug(`Active: ${this.Active}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.Active, this.Active); | ||
this.platform.device(`updateCharacteristic Active: ${this.Active}`); | ||
} | ||
if (this.RelativeHumidityHumidifierThreshold !== undefined) { | ||
this.service.updateCharacteristic( | ||
this.platform.Characteristic.RelativeHumidityHumidifierThreshold, | ||
this.RelativeHumidityHumidifierThreshold, | ||
); | ||
if (this.RelativeHumidityHumidifierThreshold === undefined) { | ||
this.platform.debug(`RelativeHumidityHumidifierThreshold: ${this.RelativeHumidityHumidifierThreshold}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.RelativeHumidityHumidifierThreshold, this.RelativeHumidityHumidifierThreshold); | ||
this.platform.device(`updateCharacteristic RelativeHumidityHumidifierThreshold: ${this.RelativeHumidityHumidifierThreshold}`); | ||
} | ||
if (!this.platform.config.options?.humidifier?.hide_temperature && this.CurrentTemperature !== undefined) { | ||
this.temperatureservice!.updateCharacteristic( | ||
this.platform.Characteristic.CurrentTemperature, | ||
this.CurrentTemperature, | ||
); | ||
if (this.platform.config.options?.humidifier?.hide_temperature && this.CurrentTemperature === undefined) { | ||
this.platform.debug(`CurrentTemperature: ${this.CurrentTemperature}`); | ||
} else { | ||
this.temperatureservice!.updateCharacteristic(this.platform.Characteristic.CurrentTemperature, this.CurrentTemperature); | ||
this.platform.device(`updateCharacteristic CurrentTemperature: ${this.CurrentTemperature}`); | ||
} | ||
@@ -404,0 +410,0 @@ } |
@@ -241,7 +241,13 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
updateHomeKitCharacteristics() { | ||
if (this.On !== undefined) { | ||
if (this.On === undefined) { | ||
this.platform.debug(`On: ${this.On}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.On, this.On); | ||
this.platform.device(`updateCharacteristic On: ${this.On}`); | ||
} | ||
if (this.OutletInUse !== undefined) { | ||
if (this.OutletInUse === undefined) { | ||
this.platform.debug(`OutletInUse: ${this.OutletInUse}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.OutletInUse, this.OutletInUse); | ||
this.platform.device(`updateCharacteristic OutletInUse: ${this.OutletInUse}`); | ||
} | ||
@@ -248,0 +254,0 @@ } |
@@ -315,22 +315,24 @@ import { Service, PlatformAccessory, Units, CharacteristicValue, MacAddress } from 'homebridge'; | ||
if (this.StatusLowBattery === undefined) { | ||
this.platform.debug(`ContactSensorState: ${this.StatusLowBattery}`); | ||
this.platform.debug(`StatusLowBattery: ${this.StatusLowBattery}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.StatusLowBattery, this.StatusLowBattery); | ||
this.platform.device(`updateCharacteristic StatusLowBattery: ${this.StatusLowBattery}`); | ||
} | ||
if (this.BatteryLevel === undefined) { | ||
this.platform.debug(`ContactSensorState: ${this.BatteryLevel}`); | ||
this.platform.debug(`BatteryLevel: ${this.BatteryLevel}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.BatteryLevel, this.BatteryLevel); | ||
this.platform.device(`updateCharacteristic BatteryLevel: ${this.BatteryLevel}`); | ||
} | ||
if (!this.platform.config.options?.meter?.hide_humidity && (this.CurrentRelativeHumidity !== undefined)) { | ||
this.humidityservice?.updateCharacteristic( | ||
this.platform.Characteristic.CurrentRelativeHumidity, | ||
this.CurrentRelativeHumidity, | ||
); | ||
if (this.platform.config.options?.meter?.hide_humidity && this.CurrentRelativeHumidity === undefined) { | ||
this.platform.debug(`CurrentRelativeHumidity: ${this.CurrentRelativeHumidity}`); | ||
} else { | ||
this.humidityservice?.updateCharacteristic(this.platform.Characteristic.CurrentRelativeHumidity, this.CurrentRelativeHumidity); | ||
this.platform.device(`updateCharacteristic CurrentRelativeHumidity: ${this.CurrentRelativeHumidity}`); | ||
} | ||
if (!this.platform.config.options?.meter?.hide_temperature && (this.CurrentTemperature !== undefined)) { | ||
this.temperatureservice?.updateCharacteristic( | ||
this.platform.Characteristic.CurrentTemperature, | ||
this.CurrentTemperature, | ||
); | ||
if (this.platform.config.options?.meter?.hide_temperature && this.CurrentTemperature === undefined) { | ||
this.platform.debug(`CurrentTemperature: ${this.CurrentTemperature}`); | ||
} else { | ||
this.temperatureservice?.updateCharacteristic(this.platform.Characteristic.CurrentTemperature, this.CurrentTemperature); | ||
this.platform.device(`updateCharacteristic CurrentTemperature: ${this.CurrentTemperature}`); | ||
} | ||
@@ -337,0 +339,0 @@ } |
@@ -209,2 +209,3 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
this.service.updateCharacteristic(this.platform.Characteristic.MotionDetected, this.MotionDetected); | ||
this.platform.device(`updateCharacteristic MotionDetected: ${this.MotionDetected}`); | ||
} | ||
@@ -211,0 +212,0 @@ } |
@@ -243,7 +243,13 @@ import { Service, PlatformAccessory, CharacteristicValue, MacAddress } from 'homebridge'; | ||
updateHomeKitCharacteristics() { | ||
if (this.On !== undefined) { | ||
if (this.On === undefined) { | ||
this.platform.debug(`On: ${this.On}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.On, this.On); | ||
this.platform.device(`updateCharacteristic On: ${this.On}`); | ||
} | ||
if (this.OutletInUse !== undefined) { | ||
if (this.OutletInUse === undefined) { | ||
this.platform.debug(`OutletInUse: ${this.OutletInUse}`); | ||
} else { | ||
this.service.updateCharacteristic(this.platform.Characteristic.OutletInUse, this.OutletInUse); | ||
this.platform.device(`updateCharacteristic OutletInUse: ${this.OutletInUse}`); | ||
} | ||
@@ -250,0 +256,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1107634
13628