fanshim-python icon indicating copy to clipboard operation
fanshim-python copied to clipboard

Sofie patch - fixed manual mode

Open SofieLewis opened this issue 4 years ago • 3 comments

Fixing the manual mode. After switching modes by long press, once a short press on button is detected the fan will switch and stay in new mode rather than reverting back after delay (2 seconds default) has passed.

SofieLewis avatar Sep 26 '19 09:09 SofieLewis

Ooops, you're onto something here- manual mode has been neglected with all the other features being piled on.

Looks like you're on the right track to fixing it, but I think this will break pre-emptive mode, which still sets enable = True rather than set_fan(True)

But that said- I think pre-emptive mode would then interfere with manual mode.

I wonder if the prempt stuff should only trigger if the fan is armed?

(also good catch with the on/off threshold descriptions, I'd never have noticed those)

Gadgetoid avatar Sep 30 '19 10:09 Gadgetoid

Hi Gadgetoid, thank you so much for taking a look at my code and for the advice. My apologies to the pre-emptive mode I missed that is was using enabled. I think I see what you mean and will have another go at this. Really enjoyed getting to know the code and getting manual to work even though I broke another mode in the process :P

Sorry for the late reply have had a rough few days but look forwards to getting back into this :) Also sorry if I am using git hub wrong, I hope this is the correct place to write this.

SofieLewis avatar Oct 03 '19 19:10 SofieLewis

No worries! It’s your PR so set your own pace. Lord knows I’m not the most responsive maintainer in the world.

Gadgetoid avatar Oct 17 '19 15:10 Gadgetoid