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

3 Speed FAN + Light Swich #343

Closed MoTechnicalities closed 1 year ago

MoTechnicalities commented 1 year ago

Describe the bug Not really a bug, but I have a 3 Speed FAN + Light Switch in one. In HomeKit I can separate the tiles for the Fan and Light switch. However, I need the Light switch side to come into HomeKit as an "Outlet" (preferably as a separate accessory). Note that when a switch device is broadcast to Homekit as an Outlet, the user may then choose to display it in HomeKit as a Fan, Outlet, or Light with any choice of those underlying available icons. (Screw-in outlets for lighting fixtures ARE a real thing.)

Expected behavior Fan Switch comes to HomeKit as a Fan accessory, and Light Switch comes to HomeKit as an Outlet accessory. (Smart Plugs use this broadcast method to allow the user different icon choices.)

Screenshots image

Device info (please complete the following information, which can be found in log): request path = /v1.0/iot-01/associated-users/devices

like this: (I deleted excessive junk) TuyaOpenAPI response: {"active_time":1619843482,"biz_type":0,"category":"fs","create_time":1616705575,"icon":"smart/program_category_icon/fs.png","id":"02038083a4cf12ea91aa","ip":"xxxxx","lat":"42.9348","local_key":"xxxxx","lon":"-85.5034","name":"Fan lamp switch","online":true,"owner_id":"18451606","product_id":"hqq73kftvzh8c92u","product_name":"Fan lamp switch","status":[{"code":"switch","value":false},{"code":"fan_speed","value":"3"},{"code":"countdown","value":"0"},{"code":"countdown_left","value":0},{"code":"light","value":true}],"sub":false,"time_zone":"-05:00","uid":"az1591917868628w06iM","update_time":1653338842,"uuid":"02038083a4cf12ea91aa"} path = /v1.0/iot-01/associated-users/devices

Device functions (please complete the following information, which can be found in log): request path = /v1.0/devices/functions Same device Id, like this: (again, I deleted excess junk) TuyaOpenAPI response: {"result":[{"category":"dj","devices": "product_id":"6cej2z4aazmtrvge"},{"category":"fs","devices":["02038083a4cf12ea91aa"],"functions":[{"code":"switch","desc":"switch","name":"switch","type":"Boolean","values":"{}"},{"code":"fan_speed","desc":"fan speed","name":"fan speed","type":"Enum","values":"{\"range\":[\"1\",\"2\",\"3\"]}"},{"code":"countdown","desc":"countdown","name":"countdown","type":"Enum","values":"{\"range\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"]}"},{"code":"light","desc":"light","name":"light","type":"Boolean","values":"{}"}],"product_id":"hqq73kftvzh8c92u"}],"success":true,"t":1676912112286,"tid":"572997b5b13f11eda7608a6d7357cdbb"} path = /v1.0/devices/functions

Additional context Add any other context or logs about the problem here.

github-actions[bot] commented 1 year ago

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

MoTechnicalities commented 1 year ago

This is resolved and works perfect! Thank you.