sfalkman / ngenic-hass-platform

Ngenic platform for Home Assistant
MIT License
33 stars 18 forks source link

I/O Inside event loop #13

Closed robinostlund closed 4 years ago

robinostlund commented 4 years ago

Hi, Noticed this in the latest version :)

2020-05-05 12:14:20 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at customcomponents/ngenic/sensor.py, line 91: for tune in ngenic.tunes(): 2020-05-05 12:14:20 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at customcomponents/ngenic/sensor.py, line 92: rooms = tune.rooms() 2020-05-05 12:14:20 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at customcomponents/ngenic/sensor.py, line 94: for node in tune.nodes(): 2020-05-05 12:14:20 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 104: if MeasurementType.TEMPERATURE in node.measurementtypes(): 2020-05-05 12:14:21 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 116: if MeasurementType.HUMIDITY in node.measurementtypes(): 2020-05-05 12:14:21 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 128: if MeasurementType.POWER_KW in node.measurementtypes(): 2020-05-05 12:14:21 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 140: if MeasurementType.ENERGY_KWH in node.measurementtypes(): 2020-05-05 12:14:21 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 104: if MeasurementType.TEMPERATURE in node.measurementtypes(): 2020-05-05 12:14:21 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 116: if MeasurementType.HUMIDITY in node.measurement_types(): 2020-05-05 12:14:21 ERROR (SyncWorker_27) [homeassistant.components.onkyo.mediaplayer] Unable to connect to receiver at 192.168.100.119 2020-05-05 12:14:22 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 128: if MeasurementType.POWER_KW in node.measurementtypes(): 2020-05-05 12:14:22 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 140: if MeasurementType.ENERGY_KWH in node.measurementtypes(): 2020-05-05 12:14:22 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 104: if MeasurementType.TEMPERATURE in node.measurementtypes(): 2020-05-05 12:14:22 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 104: if MeasurementType.TEMPERATURE in node.measurementtypes(): 2020-05-05 12:14:23 WARNING (MainThread) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for ngenic doing I/O at custom_components/ngenic/sensor.py, line 104: if MeasurementType.TEMPERATURE in node.measurement_types():

sfalkman commented 4 years ago

I think it's best to make an async version of the ngenicpy APIs, I'll look into it.

sfalkman commented 4 years ago

Fixed