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

Add support for overriding device types #25

Closed
AxelDreemurr opened this issue Oct 29, 2022 · 7 comments · Fixed by #119
Closed

Add support for overriding device types #25

AxelDreemurr opened this issue Oct 29, 2022 · 7 comments · Fixed by #119
Labels
enhancement New feature or request
Milestone

Comments

@AxelDreemurr
Copy link

It would be awesome to have, say, a 3 gang switch show up as three individual Lightbulbs in HomeKit instead of a Switch with 3 buttons (as it does now) as that would allow for assigning each Lightbulb to a different room in the same way that the plugin https://github.com/milo526/homebridge-tuya-web does.

It'd be much appreciated if you can implement this on this new version of the official plugin. Thanks in advance.

@AxelDreemurr AxelDreemurr added the enhancement New feature or request label Oct 29, 2022
@0x5e
Copy link
Owner

0x5e commented Oct 30, 2022

Thanks for the feedback. The Home App has already support to change switch's type and icon into light/fan/switch. You can change it in the single panel setting.

the second one I may consider later, this version aims to fix issue and add basic function support for as much devices as I can, advance functions may in low piority.

@Fabi3n31
Copy link

Fabi3n31 commented Nov 2, 2022

Hello.
First, thanks a lot for your work on this plugin, it solves me a lot of issues I had with the official homebridge tuya platform!

I want to echo for this request of overriding devices. I have got a garage door opener from loratap which is exposed as a switch (category kg) by the manufacturer. So it is very nice to get the garage icon in home app instead of a switch by overriding this device.
As a must have if there is a way to get the contact status of the garage door opener. The contact sensor works well in smartlife apps but seems not to be exposed.
Thanks in advance.

@0x5e
Copy link
Owner

0x5e commented Nov 2, 2022

Thanks for the feedback, however change the device type is not just so easy like changing an icon. It may not be compatible with your "kg" door opener when it was treated as door opener. Maybe your case it works, but not 100% case it can work. Then It will cause alot of trouble then.

@Fabi3n31
Copy link

Fabi3n31 commented Nov 3, 2022

I used @milo526/homebridge-tuya-web v1.1.2 plugin that allows a nice overriding for several type of devices (plugin has other limitations). It worked maybe not with 100% of the regular door opener but still it was much better than having a switch in home app.

@0x5e
Copy link
Owner

0x5e commented Nov 4, 2022

I've read the @milo526/homebridge-tuya-web readme of overruling-device-types
It says 2 examples of using this feature.

  1. dimmers reported as light but don't support hue and saturation.
  2. outlets reported as switch.

Now beta version can correctly process lights and if the specific light such as dimmer, which don't support hue, saturation, or color temperature, it won't show on the HomeKit. And the second has been fixed, now outlets will be shown as outlet correctly.

And, for switch device, HomeKit has already supported to change it's type to light/fan/switch.

@Fabi3n31 I'm sorry currently It can't be supported with a small modification. After releasing current 1.6.0 version, we can discuss how to complete this without large modification and influence other devices code readability and stability.
I'm not quite understand the last sentence, when your "kg" door opener switched to door, can it work successfully?

@0x5e
Copy link
Owner

0x5e commented Nov 4, 2022

I've come up an idea. The difficult for me is how to transform an unknown device into a known device. For example, a normal light have switch as power, bright as brightness.

For the unknown device who wants to be treated as light, if the user configures a status code map in the config, let me know which code represents for switch and which code represents for brightness, it can be done then.

@0x5e 0x5e added this to the 1.7.0 milestone Nov 6, 2022
@0x5e
Copy link
Owner

0x5e commented Dec 12, 2022

I've submit the 1.7.0-beta.5 with device override feature, please see readme and advance configs if it can suport your requirements.

@0x5e 0x5e closed this as completed Dec 12, 2022
@0x5e 0x5e linked a pull request Dec 12, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants