From f2d006919146ef52dac1ddaccffe818e589df296 Mon Sep 17 00:00:00 2001 From: Feilner Date: Thu, 29 Sep 2022 18:12:30 +0200 Subject: [PATCH] add check --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index dff783b..57f07ce 100644 --- a/index.js +++ b/index.js @@ -1448,7 +1448,7 @@ function GenericPLCAccessory(platform, config, accessoryNumber) { this.modTargetGet = function(value){return this.mapFunction(value, config.mapTargetAirPurifierStateSet);}.bind(this); } - if ('get_TargetAirPurifierState' in config) { + if ('get_TargetAirPurifierState' in config && 'set_TargetAirPurifierState' in config ) { this.service.getCharacteristic(Characteristic.TargetAirPurifierState) .on('get', function(callback) {this.getByte(callback, config.db,