From b41600104c4e7d7caa7d347e60af7ffd91feb462 Mon Sep 17 00:00:00 2001 From: Nebz <28622481+NebzHB@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:21:54 +0200 Subject: [PATCH] Update index.js --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index ef8f86c..359128d 100755 --- a/index.js +++ b/index.js @@ -419,7 +419,7 @@ JeedomPlatform.prototype.AccessoireCreateHomebridge = function(eqLogic) { let LightType="Switch"; HBservice = { controlService : new Service.Lightbulb(eqLogic.name), - characteristics : [Characteristic.On], + characteristics : [], }; const Serv = HBservice.controlService; Serv.eqLogic=eqLogic; @@ -453,6 +453,10 @@ JeedomPlatform.prototype.AccessoireCreateHomebridge = function(eqLogic) { if (Serv.actions.on && !Serv.actions.off) {this.log('|warning','Pas de type générique "Action/Lumière OFF"');} if (!Serv.actions.on && Serv.actions.off) {this.log('|warning','Pas de type générique "Action/Lumière ON"');} if (!Serv.actions.on && !Serv.actions.off) {this.log('|warning','Pas de type générique "Action/Lumière ON" et "Action/Lumière OFF"');} + else { + HBservice.characteristics.push(Characteristic.On); + Serv.addCharacteristic(Characteristic.On); + } if (Serv.infos.color && !Serv.actions.setcolor) {this.log('|warning','Pas de type générique "Action/Lumière Couleur"');} if (!Serv.infos.color && Serv.actions.setcolor) {this.log('|warning','Pas de type générique "Info/Lumière Couleur"');} if (Serv.infos.color_temp && !Serv.actions.setcolor_temp) {this.log('|warning','Pas de type générique "Action/Lumière Température Couleur"');}