tonesto7 / homebridge-smartthings

SmartThings Homebridge Plugin
385 stars 767 forks source link

[Feature Request] Switch with associated buttons as separate devices #310

Open cnnn opened 4 years ago

cnnn commented 4 years ago

Is your feature request related to a problem? Please describe. I have a few switches (GE and Innoveili) that also have button capabilities. Their device handlers expose double presses, triple presses, config button, etc. to SmartThings. This plug-in can only expose the switch either as switch or as button to HomeKit, not simultaneously.

Describe the solution you'd like I’d like to see two devices, one as switch, and another as button, at same time so I can configure button behaviors and use the button.

Describe alternatives you've considered There’s no alternative at this point. I can only expose it as button or as switch.

cnnn commented 4 years ago

to be clear, as of today with the latest plugin and smart app, the switch with both switch and button capabilities shows up as button by default, no matter whether it’s added as light or switch. It seems button type takes precedence (due to service test ordering?). In order to expose a switch or light to HomeKit, I have to explicitly filter out the button capability in the smart app. This feature request asks for both switch and button types to be expose to HomeKit as two devices.

cnnn commented 4 years ago

my temporary workaround is to set the last variable to false in ServiceTest for light, so "button" does not block "light". https://github.com/tonesto7/homebridge-smartthings-v2/blob/434747dca7ea53e8e1225da92825923a5f2cd424/src/ST_ServiceTypes.js#L123

tonesto7 commented 4 years ago

Or add the button as a light device in the smartapp?

cnnn commented 4 years ago

Or add the button as a light device in the smartapp?

Tried that but behaves same as switch device.