sermayoral / ha-samsungtv-encrypted

Samsung TV Encrypted Models (H & J Series) custom component for Home Assistant
Apache License 2.0
38 stars 24 forks source link

Detected blocking call warning #89

Open Enzokot opened 1 year ago

Enzokot commented 1 year ago

With call service (HA version 2023.2), for example:

service: media_player.play_media
data:
  entity_id: media_player.samsung_tv_remote
  media_content_type: 'send_key'
  media_content_id: 'KEY_PLAY'

The warnings appear in the log:

2023-02-04 12:16:26.661 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for samsungtv_encrypted doing blocking calls at custom_components/samsungtv_encrypted/PySmartCrypto/pysmartcrypto.py, line 105: time.sleep(0.1)

2023-02-04 12:16:36.384 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to putrequest inside the event loop. This is causing stability issues. Please report issue to the custom integration author for samsungtv_encrypted doing blocking calls at custom_components/samsungtv_encrypted/PySmartCrypto/pysmartcrypto.py, line 95: websocket_response = requests.get(step4_url)