Skip to content

Update wattwise.py#9

Closed
CWILDMOUNTAIN wants to merge 5 commits intobullitt186:mainfrom
CWILDMOUNTAIN:patch-2
Closed

Update wattwise.py#9
CWILDMOUNTAIN wants to merge 5 commits intobullitt186:mainfrom
CWILDMOUNTAIN:patch-2

Conversation

@CWILDMOUNTAIN
Copy link
Collaborator

Problem:
The check for cheapest / expensive hours is only done for the day the forecast is published at 2 p.m. for the same day as it compares now.date and forecast.date. When there are cheap hours e.g. 2-4 p.m. this very day but even cheaper hours from e.g. 11-14h the next day, the script will only pull the cheap hours from 2-4 p.m. but ignore the cheap hours from tomorrow, even if the price is lower the next day.

Solution:
When the date changes at 0:00 the script will redo the check for cheapest hours on the new day.

changes have been made for expensive hours respectively.

Problem: 
The check for cheapest / expensive hours is only done for the day the forecast is published at 2 p.m. for the same day as it compares now.date and forecast.date. 
When there are cheap hours e.g. 2-4 p.m. this very day but even cheaper hours from e.g. 11-14h the next day, the script will only pull the cheap hours from 2-4 p.m. but ignore the cheap hours from tomorrow, even if the price is lower the next day.

Solution: 
When the date changes at 0:00 the script will redo the check for cheapest hours on the new day. 

changes have been made for expensive hours respectively.
@bullitt186
Copy link
Owner

Thank you for the good explanation and fix!
I am not able to verify it these days as i am travelling. I'd merge it anyhow but the linting shows errors. In order to keep the codebase tidy, could you run the linter on your end an fix the changes?
Thank you very much!

@CWILDMOUNTAIN
Copy link
Collaborator Author

sorry for the delay, should be good by now.

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