homebridge-tuya-platform icon indicating copy to clipboard operation
homebridge-tuya-platform copied to clipboard

Irrigation Valve switch shows ON in HomeKit when the valve is closed and shows OFF when the valve is opened

Open Mezuss opened this issue 1 year ago • 2 comments

Prerequisite

  • [X] Yes, I've read the readme completely.

Cache

  • [X] Yes, I've cleaned accessory cache and the issue still exists.

Version

1.7.0-beta 51

Device Infomation JSON File

"appSchema": "tuyaSmart",
        "deviceOverrides": [
            {
                "id": "xxxxxxxxxxxxxxxxxxxxxxxxx",
                "unbridged": false,
                "schema": [
                    {
                        "code": "LeftManualSwitch",
                        "newCode": "switch",
                        "type": "Boolean"
                    },
                    {
                        "code": "RightManualSwitch",
                        "newCode": "switch_1",
                        "type": "Boolean"
                    }

Device Control Mode

DP Instruction

Logs

No response

Other Infomations

When I close the valve it shows opened on HomeKit and when I open it it shows closed. Is there a way to reverse the ON/OFF logic of the switch with the OPEN/CLOSE state of the valve? Thank you

Mezuss avatar Oct 16 '23 02:10 Mezuss

Same for ggq, where I use this solution:

"onGet": "(value === true) ? false : true;",                                 "onSet": "(value === false) ? true : false;"

MacForAll avatar Oct 28 '23 21:10 MacForAll

Same for ggq, where I use this solution:

"onGet": "(value === true) ? false : true;",                                 "onSet": "(value === false) ? true : false;"

Where did you add the lines? On JSON config ?

Mezuss avatar Oct 31 '23 21:10 Mezuss