File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -790,10 +790,8 @@ export class DingzAccessory extends DingzDaBaseAccessory {
790790 }
791791
792792 // Add WindowCovering (Blinds)
793- private addWindowCoveringService ( name : string , id ?: WindowCoveringId ) {
794- let service : Service ;
795- if ( id ) {
796- service =
793+ private addWindowCoveringService ( name : string , id : WindowCoveringId ) {
794+ const service : Service =
797795 this . accessory . getServiceById (
798796 this . platform . Service . WindowCovering ,
799797 id . toString ( ) ,
@@ -803,11 +801,6 @@ export class DingzAccessory extends DingzDaBaseAccessory {
803801 `${ name } B${ id } ` ,
804802 id . toString ( ) ,
805803 ) ;
806- } else {
807- service =
808- this . accessory . getService ( this . platform . Service . WindowCovering ) ??
809- this . accessory . addService ( this . platform . Service . WindowCovering , name ) ;
810- }
811804 // each service must implement at-minimum the "required characteristics" for the given service type
812805 // see https://developers.homebridge.io/#/service/Lightbulb
813806
You can’t perform that action at this time.
0 commit comments