-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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 for Environment Canada date being wrong after midnight #121850
Conversation
Hey there @michaeldavie, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
I put this back to draft. The approach used is not bad for presenting the forecast properly, but I may have a better way. Still exploring so the code as is may be the best we can do. I'm thinking exacty what you wrote about timezones. I have a change I'm testing in the env_canada lib. Thank you so much for your help! |
I'm testing live now. Much cleaner now! Even better, pushed some of the logic into the env_canada lib for better separation of concerns. |
Does the timestamp in the lib contain a timezone so it's accurately calculating to UTC? |
Yes. It is UTC. |
I’m running this live in two time zones to make sure everything works as expected. I’m sure from the tests that it does what I want. Checking that I want the right thing 😂 |
I ran this overnight and everything works great! I had two weather reports active, one for the east coast and another for the west coast (a 3 hour time zone difference). Everything updated just as expected and the reported bug no longer exists. Thank you @gjohansson-ST for all your help! Very appreciated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gwww 👍
Proposed change
Fix for Environment Canada date being wrong after midnight. The data from Environment Canada includes the previous night's forecast on the following day. This fix takes that into account.
michaeldavie/env_canada@v0.7.1...v0.7.2
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: