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

End of Daylight Saving Time is not handled correctly #427

Open
uphillbattle opened this issue Oct 26, 2024 · 1 comment
Open

End of Daylight Saving Time is not handled correctly #427

uphillbattle opened this issue Oct 26, 2024 · 1 comment

Comments

@uphillbattle
Copy link

uphillbattle commented Oct 26, 2024

Version of the custom_component

0.0.15

Homeassistant version

2024.10.4

Configuration

Configured in UI

Describe the bug

End of DST is not handled correctly. The hour

start: 2024-10-27T02:00:00+02:00
end: 2024-10-27T02:00:00+01:00

is missing. The day in question only has 24 hours in the Nordpool sensor, while the day actually has 25 hours since the clock is turned back one hour from 3am (Daylight Saving Time) to 2am (Standard Time).

Debug log

2024-10-26 17:32:40.580 INFO (MainThread) [custom_components.nordpool.aio_price] Hour has the same start and end, most likly due to dst change {'start': datetime.datetime(2024, 10, 27, 0, 0, tzinfo=<UTC>), 'end': datetime.datetime(2024, 10, 27, 1, 0, tzinfo=<UTC>), 'value': 14.09} exluded this hour

The integration happily excludes this hour. Should be improved to accept that two days a year are 23 and 25 hours, respectively.

@Hellowlol
Copy link
Collaborator

Yeah, i agree this should be handled better. Im not sure why ended up using the current solution. I think we should check if there price a valid (so not None, null) if it skip the hours, if not allow it to be added.

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

No branches or pull requests

2 participants