Conversation
Correct typos when parsing arguments
removed last_change and fixed the manual mode. Before it would only turn on or off (depending if you switched while fan was on or off) for the delay time (2s default)
Found bug an cleaned empty lines after testing on pi
|
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 But that said- I think pre-emptive mode would then interfere with manual mode. I wonder if the (also good catch with the on/off threshold descriptions, I'd never have noticed those) |
| @@ -142,12 +135,9 @@ def held_handler(): | |||
| enable = True | |||
There was a problem hiding this comment.
Wont currently work because enable is no longer used. Probably need to refactor preempt into armed so it doesn't interfere with manual mode.
|
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. |
|
No worries! It’s your PR so set your own pace. Lord knows I’m not the most responsive maintainer in the world. |
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.