homebridge-switchbot
homebridge-switchbot copied to clipboard
Bug: "Other" IR Devices send commandOn and commandOff at reversed times
Describe The Bug
When turning on a device, it sends commandOff, and vice versa
To Reproduce
Set up an IR "Other" device and try toggling state.
Expected behavior
Turning on a device should use the configured commandOn command, not commandOff
Relevant log output
(When turning a device off)
[12/04/2022, 15:31:22] [SwitchBot] [DEBUG] Other: Iceman On: 0
[12/04/2022, 15:31:22] [SwitchBot] Other: Iceman Sending request to SwitchBot API. command: On, parameter: default, commandType: customize
[12/04/2022, 15:31:23] [SwitchBot] [DEBUG] Other: Iceman pushChanges: [object Object]
[12/04/2022, 15:31:23] [SwitchBot] [DEBUG] Other: Iceman Command successfully sent.
[12/04/2022, 15:31:23] [SwitchBot] [DEBUG] Other: Iceman updateCharacteristic Active: 1
Config for homebridge-switchbot
{
"deviceId": "xxxxxxxxx",
"configRemoteType": "Fan",
"other": {
"deviceType": "Fan",
"commandOff": "Off",
"commandOn": "On"
},
"logging": "debug"
}
Screenshots
No response
Device & Model
Raspberry Pi 3
Node.js Version
v16.13.0
NPM Version
v8.1.0
Homebridge Version
v1.4.0
Homebridge Switchbot Plugin Version
v1.12.8
Homebridge Config UI X Plugin Version
v4.42.0
Operating System
Raspbian
I submitted a PR for this but it's my first, so apologies if I did anything wrong.
should be resolved from PR