-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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 utility_meter on DST changes #129862
base: dev
Are you sure you want to change the base?
Fix utility_meter on DST changes #129862
Conversation
async def test_self_reset_hourly_dst2(hass: HomeAssistant) -> None: | ||
"""Test weekly reset of meter in DST change conditions.""" | ||
|
||
hass.config.time_zone = "Europe/Berlin" | ||
dt_util.set_default_time_zone(dt_util.get_time_zone(hass.config.time_zone)) | ||
await _test_self_reset( | ||
hass, gen_config("daily"), "2024-10-26T23:59:00.000000+02:00" | ||
) | ||
|
||
|
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.
What is this testing?
The test passes locally even without the new dependency and without the code changes.
I would expect the tests to fail without the dependency/code changes, and pass with the dependency/code changes.
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.
I was targeting the situation in #129504 which I'm failing to replicate :(
Ended up refactoring the code a bit and updating the dependency instead
This actually works standalone |
One possibility is to change to https://github.com/cuu508/cronsim |
Breaking change
Proposed change
Due to an underlying unsolved bug in croniter kiorky/croniter#1 that affects DST changes this PR moves to cronsim
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: