merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
394 stars 63 forks source link

One Switch for Natural/Straight Mode on supporting fans #320

Closed justspacedog closed 2 years ago

justspacedog commented 2 years ago

I would like to have one switch between natural and straight mode for supporting fans. Right now there are two switches (one for natural and one for straight mode) and when I turn off the one that is turned on, it turns on again without a change of modes.

I would like to have a switch specifically for straight mode. So when it is turned off (standard) the natural mode is on.

This would have the advantage that you can also switch off the straight mode from the Home.app overview. Now only one switch appears to be on and when you press it, it goes off and on again and nothing changes: CleanShot 2022-08-12 at 10 05 45

You would also no longer have to scroll in the control view of the fan: CleanShot 2022-08-12 at 10 07 17

merdok commented 2 years ago

Hi,

unfortunately it is not that easy as you imagine it. The biggest issue is here that a lot of fans support 3 modes. Straight, natural and sleep for example. How would you imagine the toggle button would behave in that case where you have 3 states? When sleep mode is enabled then the button can be neither on or off it either it would indicate the wrong status. It makes sense what you describe, but it cannot be that easy implemented due to the various variations which exists out there.

justspacedog commented 2 years ago

I understand - thank you for your fast reply.

I tried to poke around in the sourcecode but I could not get it to work for my fan. If anyone finds a solution, I would really appreciate it if you share it with me. :)