iRayanKhan / homebridge-tuya

A Homebridge plugin to control Tuya devices locally.
MIT License
395 stars 165 forks source link

Trigger Scene Button TOPGREENER #430

Open ukiews opened 9 months ago

ukiews commented 9 months ago

I have the TOPGREENER scene controller. https://a.co/d/31Wsz0n

I am able to control the on/off switch on it through the plugin. But I am unable to figure out how to trigger the scene buttons.

For example, here are the parameters for the first button:

  {
    "code": "sense_0",
    "custom_name": "",
    "dp_id": 101,
    "time": 1703176920622,
    "value": "sense"
  },

The plugin debug upon bridge restart shows:

  {
    "code": "sense_0",
    "type": "Enum",
    "values": "{\"range\":[\"sense\"]}"
  },

If I add the custom Dp code:

"schema": [ { "code": "101", "type": "Enum", "property": { "range": [ "sense" ] } } ]

This does not work and the Home app does not show an addition switch.

So is there a way to detect the scene swith being pressed?