@@ -43,7 +43,6 @@ export class HmIPGarageDoor extends HmIPGenericDevice implements Updateable {
4343 private service : Service ;
4444 private switchService : Service | undefined ;
4545
46- private withLightSwitch = true ;
4746 private currentDoorState : DoorState = DoorState . CLOSED ;
4847 private previousDoorState : DoorState = DoorState . CLOSED ;
4948 private processing = false ;
@@ -56,8 +55,6 @@ export class HmIPGarageDoor extends HmIPGenericDevice implements Updateable {
5655 ) {
5756 super ( platform , accessory ) ;
5857
59- this . withLightSwitch = this . accessoryConfig ?. [ 'lightSwitch' ] === true ;
60-
6158 this . platform . log . debug ( `Created garage door ${ accessory . context . device . label } ` ) ;
6259 this . service = this . accessory . getService ( this . platform . Service . GarageDoorOpener )
6360 || this . accessory . addService ( this . platform . Service . GarageDoorOpener ) ;
@@ -73,7 +70,9 @@ export class HmIPGarageDoor extends HmIPGenericDevice implements Updateable {
7370 this . service . getCharacteristic ( this . platform . Characteristic . ObstructionDetected )
7471 . on ( 'get' , this . handleObstructionDetectedGet . bind ( this ) ) ;
7572
76- if ( this . withLightSwitch ) {
73+ const withLightSwitch = this . accessoryConfig ?. [ 'lightSwitch' ] === true ;
74+
75+ if ( withLightSwitch ) {
7776 this . switchService = this . accessory . getService ( this . platform . Service . Switch )
7877 || this . accessory . addService ( this . platform . Service . Switch ) ;
7978
@@ -149,7 +148,7 @@ export class HmIPGarageDoor extends HmIPGenericDevice implements Updateable {
149148
150149 if ( doorChannel . processing !== null && doorChannel . processing !== this . processing ) {
151150 this . processing = doorChannel . processing ;
152- this . platform . log . info ( 'Garage door processing state of %s changed to %s' , this . accessory . displayName , this . processing ) ;
151+ this . platform . log . debug ( 'Garage door processing state of %s changed to %s' , this . accessory . displayName , this . processing ) ;
153152 if ( ! this . processing && this . currentDoorState !== DoorState . OPEN && this . currentDoorState !== DoorState . CLOSED ) {
154153 this . service . updateCharacteristic ( this . platform . Characteristic . CurrentDoorState ,
155154 this . platform . Characteristic . CurrentDoorState . STOPPED ) ;
0 commit comments