Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saturation assignment fix in RGBTWLightAccessory.js #484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eddydas
Copy link

@eddydas eddydas commented Sep 23, 2024

Correctly assign saturation value with newColor.s instead of newColor.h

This fixes error like this:

[23/09/2024, 01:58:19] [homebridge-tuya] This plugin generated a warning from the characteristic 'Saturation': characteristic was supplied illegal value: number 300 exceeded maximum of 100. See https://homebridge.io/w/JtMGR for more info.
[23/09/2024, 01:58:19] [homebridge-tuya] Error: 
    at Saturation.Characteristic.characteristicWarning (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3016:105)
    at Saturation.Characteristic.validateUserInput (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2932:14)
    at Saturation.Characteristic.updateValue (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2333:20)
    at TuyaAccessory.<anonymous> (/var/lib/homebridge/node_modules/homebridge-tuya/lib/RGBTWLightAccessory.js:129:81)
    at TuyaAccessory.emit (node:events:518:28)
    at TuyaAccessory._change (/var/lib/homebridge/node_modules/homebridge-tuya/lib/TuyaAccessory.js:562:18)
    at TuyaAccessory._msgHandler_3_4 (/var/lib/homebridge/node_modules/homebridge-tuya/lib/TuyaAccessory.js:475:30)
    at /var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:4018:13
    at Object.process (/var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:1681:21)
    at /var/lib/homebridge/node_modules/homebridge-tuya/node_modules/async/dist/async.js:1533:23

Correctly assign saturation value with newColor.s instead of newColor.h
@eddydas
Copy link
Author

eddydas commented Sep 23, 2024

Tested with a XMCosy light supporting color and temp. Works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant