homebridge-smarthome icon indicating copy to clipboard operation
homebridge-smarthome copied to clipboard

Mi Smart switch (round button)

Open mistert871 opened this issue 7 years ago • 4 comments

Hi,

The Mi Smart switch (round button) with 3 options: 1 click, 2 click and long press/click. The first 2 options works perfectly, but the third option doesn't work. I see long press in Homekit but it doesn't work.

Is this a known bug? And can you please fix it or tell me how to fix it?

Thanks!

Regards, Tim

mistert871 avatar Oct 19 '17 07:10 mistert871

I'm sorry, my new house is being renovated, and over time I will test the equipment you are referring to and give you a reply

rench avatar Nov 02 '17 09:11 rench

Thanks Rench. Do you know when you can reply? Im really waiting for it. Is there something I can test? THanks

mistert871 avatar Nov 07 '17 13:11 mistert871

Do you know when you can reply? Im really waiting for it. Is there something I can test? THanks

mistert871 avatar Nov 27 '17 16:11 mistert871

Hi,

just add this condition to kit/mijia/switch.js (cca line 60):

  } else if (status == 'long_click_press') {
    event.updateValue(Characteristic.ProgrammableSwitchEvent.LONG_PRESS); //2
  }

hatack avatar Mar 28 '18 13:03 hatack