jdejaegh / irm-kmi-ha

Home Assistant weather provider using data from Belgian IRM KMI 🇧🇪 🇱🇺 🇳🇱
MIT License
40 stars 0 forks source link

Detected blocking call to open inside the event loop by custom integration 'irm_kmi' #39

Closed gieljnssns closed 3 months ago

gieljnssns commented 3 months ago

Describe the bug Warning s with the new HA beta

Checklist

To Reproduce Steps to reproduce the behavior:

  1. Update HA to 2024.6 beta

Expected behavior No warnings Screenshots If applicable, add screenshots to help explain your problem.

Version

Additional context

Detected blocking call to open inside the event loop by custom integration 'irm_kmi' at custom_components/irm_kmi/rain_graph.py, line 96: self._dwg.embed_font(name="Roboto Medium", filename=font_file) (offender: /usr/local/lib/python3.12/site-packages/svgwrite/container.py, line 150: data = open(filename, 'rb').read()), please create a bug report at https://github.com/jdejaegh/irm-kmi-ha/issues
Detected blocking call to open inside the event loop by custom integration 'irm_kmi' at custom_components/irm_kmi/rain_graph.py, line 304: with open(bg_image_path, 'rb') as f: (offender: /config/custom_components/irm_kmi/rain_graph.py, line 304: with open(bg_image_path, 'rb') as f:), please create a bug report at https://github.com/jdejaegh/irm-kmi-ha/issues
jdejaegh commented 3 months ago

This has been fixed in version 0.2.15 However, some async variants of the blocking calls are only available in Home Assistant 2024.6 so Home Assistant needs to be at least 2024.6 (the beta versions work as well).