Skip to content

Commit

Permalink
fix swing mode default
Browse files Browse the repository at this point in the history
  • Loading branch information
arachnetech committed Feb 19, 2023
1 parent 67ac263 commit 6cd0061
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#export DEBUG=*
homebridge -U test -P .
homebridge -U test -D -I -P .
43 changes: 21 additions & 22 deletions test/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 6cd0061

Please sign in to comment.