Code formating

This commit is contained in:
Serge Wagener 2022-03-08 16:51:01 +01:00
parent ae63f6cdee
commit 323c313f3c

View File

@ -21,12 +21,11 @@ export class GarageDoor implements AccessoryPlugin {
this.deviceService = new this.platform.Service.GarageDoorOpener(accessory.name); this.deviceService = new this.platform.Service.GarageDoorOpener(accessory.name);
// create handlers for required characteristics // create handlers for required characteristics
this.informationService = this.informationService =
new this.platform.Service.AccessoryInformation() new this.platform.Service.AccessoryInformation()
.setCharacteristic(this.platform.Characteristic.Manufacturer, accessory.manufacturer) .setCharacteristic(this.platform.Characteristic.Manufacturer, accessory.manufacturer)
.setCharacteristic(this.platform.Characteristic.Model, accessory.model) .setCharacteristic(this.platform.Characteristic.Model, accessory.model)
.setCharacteristic(this.platform.Characteristic.SerialNumber, accessory.currentdoorstate); // FIXME .setCharacteristic(this.platform.Characteristic.SerialNumber, accessory.currentdoorstate);
if (accessory.currentdoorstate) { if (accessory.currentdoorstate) {
this.platform.shng.addMonitor(accessory.currentdoorstate, this.shngCurrentDoorStateCallback.bind(this)); this.platform.shng.addMonitor(accessory.currentdoorstate, this.shngCurrentDoorStateCallback.bind(this));
@ -66,8 +65,6 @@ export class GarageDoor implements AccessoryPlugin {
} }
getCurrentDoorState(): Nullable<CharacteristicValue> { getCurrentDoorState(): Nullable<CharacteristicValue> {
//getCurrentDoorState(value: CharacteristicValue) {
// this.currentDoorState = value as number;
this.platform.log.info('getCurrentDoorState:', this.accessory.name, 'is currently', this.currentDoorState); this.platform.log.info('getCurrentDoorState:', this.accessory.name, 'is currently', this.currentDoorState);
return this.currentDoorState; return this.currentDoorState;
} }
@ -79,8 +76,6 @@ export class GarageDoor implements AccessoryPlugin {
} }
getTargetDoorState(): Nullable<CharacteristicValue> { getTargetDoorState(): Nullable<CharacteristicValue> {
//getTargetDoorState(value: CharacteristicValue) {
// this.targetDoorState = value as number;
this.platform.log.info('getTargetDoorState:', this.accessory.name, 'is currently', this.targetDoorState); this.platform.log.info('getTargetDoorState:', this.accessory.name, 'is currently', this.targetDoorState);
return this.targetDoorState; return this.targetDoorState;
} }