ndokter / dsmr_parser

Library to parse Dutch Smart Meter Requirements (DSMR) telegrams.
MIT License
110 stars 64 forks source link

Avoid loading timezone at runtime #157

Closed elupus closed 1 month ago

elupus commented 1 month ago

Pytz will load timezone info from files in a lazy fashion on first access. This triggers warnings in HA due to it blocking the event loop.

Pre-load the needed timezone info at module import instead, which will run in executor in HA.

Fixes #156

ndokter commented 1 month ago

Thanks! I will make a new build soon

bdraco commented 1 month ago

https://github.com/ndokter/dsmr_parser/issues/154

Would be nice to fix this one as well. I can do a PR if it's desired