Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sofie patch - fixed manual mode #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SofieLewis
Copy link

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.

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
@Gadgetoid
Copy link
Member

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 Gadgetoid added bug Something isn't working enhancement New feature or request labels Sep 30, 2019
@Gadgetoid Gadgetoid self-assigned this Sep 30, 2019
@@ -142,12 +135,9 @@ def held_handler():
enable = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wont currently work because enable is no longer used. Probably need to refactor preempt into armed so it doesn't interfere with manual mode.

@SofieLewis
Copy link
Author

SofieLewis commented Oct 3, 2019

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.

@Gadgetoid
Copy link
Member

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

@Gadgetoid Gadgetoid added the help wanted Extra attention is needed label Aug 14, 2020
@Gadgetoid Gadgetoid added this to the Overhaul automatic.py milestone Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants