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

fix and improve auto-temperature.py script #23

Merged
merged 1 commit into from
Apr 4, 2024
Merged

fix and improve auto-temperature.py script #23

merged 1 commit into from
Apr 4, 2024

Conversation

zefr0x
Copy link
Contributor

@zefr0x zefr0x commented Apr 4, 2024

Now it should not suddenly jump to TEMP_DAY when current_time == DUSK_TIME.

Also, I made some performance and portability improvments. Other performance improvments can be made, but it might reduce accuracy and lead to unexpected results.

Also, the WINDOW is now 15m rather than 30m, since 15m are enough for the eyes to not notice.


The bug was here:

if dusk_time < curr_time or curr_time < dawn_time:

It should be:

 if dusk_time <= curr_time or curr_time < dawn_time: 

Now it should not suddenly jump to `TEMP_DAY` when current_time == DUSK_TIME.
Also, I made some performance and portability improvments.
@MaxVerevkin
Copy link
Owner

Nice, thanks!

@MaxVerevkin MaxVerevkin merged commit 14b23f9 into MaxVerevkin:main Apr 4, 2024
4 checks passed
MaxVerevkin pushed a commit that referenced this pull request May 12, 2024
It looks like after refactoring the code in #23, I just returned the original problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants