diff --git a/index.js b/index.js index 1adc81d..d2f3af9 100644 --- a/index.js +++ b/index.js @@ -2333,7 +2333,7 @@ function makeThing( log, accessoryConfig, api ) { if( !values ) { values = [ 'DISABLED', 'ENABLED' ]; } - multiCharacteristic( service, 'swingMode', Characteristic.SwingMode, config.topics.setSwingMode, config.topics.getSwingMode, values, Characteristic.SwingMode.DISABLED ); + multiCharacteristic( service, 'swingMode', Characteristic.SwingMode, config.topics.setSwingMode, config.topics.getSwingMode, values, Characteristic.SwingMode.SWING_DISABLED ); } // Characteristic.TemperatureDisplayUnits diff --git a/run.sh b/run.sh index 4ad19c1..bf0a66c 100755 --- a/run.sh +++ b/run.sh @@ -1,2 +1,2 @@ #export DEBUG=* -homebridge -U test -P . +homebridge -U test -D -I -P . diff --git a/test/config.json b/test/config.json index ea08bed..13eeb4d 100644 --- a/test/config.json +++ b/test/config.json @@ -770,28 +770,6 @@ 1 ] }, - { - "accessory": "mqttthing", - "type": "heaterCooler", - "name": "HeaterCooler", - "url": "homebridge2", - "logMqtt": true, - "topics": { - "setActive": "test/heatcool/setActive", - "getActive": "test/heatcool/getActive", - "getCurrentHeaterCoolerState": "test/heatcool/getCurrentHeaterCoolerState", - "setTargetHeaterCoolerState": "test/heatcool/setCurrentHeaterCoolerState", - "getCurrentTemperature": "test/heatcool/getCurrentTemperature", - "setCoolingThresholdTemperature": "test/heatcool/setCoolingThresholdTemperature", - "setHeatingThresholdTemperature": "test/heatcool/setHeatingThresholdTemperature", - "setRotationMode": "test/heatcool/setRotationMode", - "setSwingMode": "test/heatcool/setSwingMode", - "setRotationSpeed": { - "topic": "test/heatcool/setRotationSpeed", - "apply": "return [ 'off', 'min', 'low', 'medium', 'high', 'max' ][ Math.floor( message / 20 ) ];" - } - } - }, { "accessory": "mqttthing", "type": "television", @@ -981,6 +959,27 @@ ], "accessories": [ { + "accessory": "mqttthing", + "type": "heaterCooler", + "name": "HeaterCooler", + "url": "homebridge2", + "logMqtt": true, + "topics": { + "setActive": "test/heatcool/setActive", + "getActive": "test/heatcool/getActive", + "getCurrentHeaterCoolerState": "test/heatcool/getCurrentHeaterCoolerState", + "setTargetHeaterCoolerState": "test/heatcool/setCurrentHeaterCoolerState", + "getCurrentTemperature": "test/heatcool/getCurrentTemperature", + "setCoolingThresholdTemperature": "test/heatcool/setCoolingThresholdTemperature", + "setHeatingThresholdTemperature": "test/heatcool/setHeatingThresholdTemperature", + "setRotationMode": "test/heatcool/setRotationMode", + "setSwingMode": "test/heatcool/setSwingMode", + "setRotationSpeed": { + "topic": "test/heatcool/setRotationSpeed", + "apply": "return [ 'off', 'min', 'low', 'medium', 'high', 'max' ][ Math.floor( message / 20 ) ];" + } + } + }, { "accessory": "mqttthing", "type": "fan", "name": "Test Fan",