RogerSelwyn / Home_Assistant_SkyQ_MediaPlayer

Home Assistant SkyQ Media player component
MIT License
101 stars 17 forks source link

[BUG] Detected blocking call to open inside the event loop #170

Closed B-Hartley closed 3 weeks ago

B-Hartley commented 2 months ago

Describe the bug

Blocking call reported in Home Assistant Log on: 2024.6.0b2

To reproduce

Blocking call reported in Home Assistant Log on: 2024.6.0b2

Expected bahavior

No errors

What version of SkyQ has the issue?

v2.11.7

What was the last working version of Sky Q Integration?

No response

What version of Home Assistant Core has the issue?

2024.6.0b2

Configuration type

UI

Configuration UI

na

Configuration YAML

na

Anything in the logs that might be useful for us?

2024-05-30 17:34:05.676 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'skyq' at custom_components/skyq/init.py, line 157: with open(statefile, "r", encoding=STORAGE_ENCODING) as infile: (offender: /config/custom_components/skyq/init.py, line 157: with open(statefile, "r", encoding=STORAGE_ENCODING) as infile:), please create a bug report at https://github.com/RogerSelwyn/Home_Assistant_SkyQ_MediaPlayer/issues 2024-05-30 17:34:05.716 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'skyq' at custom_components/skyq/init.py, line 157: with open(statefile, "r", encoding=STORAGE_ENCODING) as infile: (offender: /config/custom_components/skyq/init.py, line 157: with open(statefile, "r", encoding=STORAGE_ENCODING) as infile:), please create a bug report at https://github.com/RogerSelwyn/Home_Assistant_SkyQ_MediaPlayer/issues

Additional information

No response

RogerSelwyn commented 2 months ago

I will try and fix this, but I no longer have any Sky q boxes (they were just costing too much with too little need). If you are able to submit a PR it would be appreciated.

B-Hartley commented 2 months ago

oh no, that's a shame. I'll have a look, but I suspect it's way beyond my current skill level. I guess it won't break for a good while yet.

If you are willing to have a go at fixing, I'm happy to test.

RogerSelwyn commented 2 months ago

I’ve done the same fix in other integrations, so I should be able to sort it.

RogerSelwyn commented 1 month ago

Should be fixed with v2.11.8