tuya / tuya-homebridge

Homebridge custom plugin for controlling Powered by Tuya (PBT) devices in HomeKit. This plugin is officially maintained by the Tuya Developer Team.
MIT License
332 stars 168 forks source link

Can’t set ‘Low’ and ‘High’ string for HEATSTRIP Convector Heater #380

Closed ThorkelAU closed 2 months ago

ThorkelAU commented 4 months ago

Describe the bug The Heatstrip convector heater uses ‘level_1’ and ‘level2’ for the Low and High setting on dpRotationSpeed. ConvectorAccessory.js has an Alphanumeric test on line 32 that doesn’t include - so the accessory doesn’t get added.

Expected behavior

Changing the test for CmdLow (and similarly for CmdHigh) to the following allows the ‘level_1’ and ‘level_2’ string to work, and ensures the heater gets added when the plugin initialises.

if (/^[a-z0-9_]+$/i.test(this.device.context.cmdLow)) this.cmdLow = ('' + this.device.context.cmdLow).trim();

github-actions[bot] commented 4 months ago

Thank you for your feedback, we will solve this issue soon

github-actions[bot] commented 2 months ago

Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.