make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.07k stars 432 forks source link

Last update don't solve my problem with HA 2024.5.0 stops the integration #1871

Closed SmartLifeAbbecourt closed 2 months ago

SmartLifeAbbecourt commented 2 months ago

Hello, HA 2024.5 stops the integration from receiving updates unless I deactivate all my devices and activate them again one by one each time HA restart.

My devices are

Best regards Philippe

make-all commented 2 months ago

There are reports that HA 2024.5 has broken Matter and Zigbee integrations also. At this point there is nothing further I can do, as I am away from home and unable to test for myself on the new version.

Probably I will stop trying to keep up with HA's rapid churn of integration APIs and find something more productive to do with my time, as they have been quite hostile towards suggestions and even pull requests to make simple changes that reduce the load on custom integration authors.

SmartLifeAbbecourt commented 2 months ago

Ok I understand your point of view.

Thank you for your job any way

SmartLifeAbbecourt commented 2 months ago

For my use I will downgrade HA to keep you addon working that is must important for me because tuya don't expect to include my device category to them ha integration

garry0garry commented 2 months ago

"tuya_local", "version": "2024.5.0"

tompd_63lw_breaker :-( tuya_local-04af1652d2a1f1a20788ab10b185eea3-Circuit breaker energy meter-58f63c89319f7abe7802d9ab1960799f(1).json

/usr/local/lib/python3.12/asyncio/base_events.py:1973: RuntimeWarning: coroutine 'TuyaLocalDevice.receive_loop' was never awaited handle = self._ready.popleft()

make-all commented 2 months ago

Released 2024.5.1 with another attempt at fixing this

luuquangvu commented 2 months ago

After updated to 2024.5.1 I got another issue as below. Please help to fix it. Thank you so much.

Logger: homeassistant Source: helpers/frame.py:203 First occurred: 12:56:05 PM (2 occurrences) Last logged: 12:56:05 PM

Error doing job: Future exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tuya_local/device.py", line 147, in actually_start self._refresh_task = self._hass.async_create_task(self.receive_loop()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task self.verify_event_loop_thread("async_create_task") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()). Please report it to the author of the 'tuya_local' custom integration.

almirus commented 2 months ago

After the update, all devices (wifi, Bluetooth subdevices) became unavailable. I had to click "Reload" for each device. In the logs, there was only this:

2024-05-02 09:21:00.693 ERROR (MainThread) [custom_components.tuya_local.device] <class 'Exception'>: Unable to find device on network (specify IP address) while initialising device bff24f75c70c2ca9f85y7k
2024-05-02 09:22:05.964 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 74: parent=tinytuya.Device(dev_id, address, local_key), (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues

2024-05-02 09:38:08.157 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 77: self._api = tinytuya.Device(dev_id, address, local_key) (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:08.265 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:08.269 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:08.273 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:08.276 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:10.757 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 74: parent=tinytuya.Device(dev_id, address, local_key), (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:10.862 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:15.762 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 74: parent=tinytuya.Device(dev_id, address, local_key), (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:20.768 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 74: parent=tinytuya.Device(dev_id, address, local_key), (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:24.737 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 77: self._api = tinytuya.Device(dev_id, address, local_key) (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:24.847 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:24.851 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:24.855 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:26.894 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 74: parent=tinytuya.Device(dev_id, address, local_key), (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:31.897 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 74: parent=tinytuya.Device(dev_id, address, local_key), (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:36.913 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 74: parent=tinytuya.Device(dev_id, address, local_key), (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:37.019 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:37.289 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 77: self._api = tinytuya.Device(dev_id, address, local_key) (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 944: time.sleep(0.1)), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:37.399 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 09:38:55.404 ERROR (MainThread) [custom_components.tuya_local.device] <class 'Exception'>: Unable to find device on network (specify IP address) while initialising device bff24f75c70c2ca9f85y7k

2024-05-02 09:39:31.319 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tuya_local/device.py", line 147, in actually_start
    self._refresh_task = self._hass.async_create_task(self.receive_loop())
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
    frame.report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()). Please report it to the author of the 'tuya_local' custom integration.
2024-05-02 09:39:31.323 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.12/asyncio/base_events.py:1973: RuntimeWarning: coroutine 'TuyaLocalDevice.receive_loop' was never awaited
  handle = self._ready.popleft()

After each reboot of the HA server, each of the devices needs to be manually restarted.

stalakerob commented 2 months ago

Just installed latest HA and Tuya-Local versions. I have the same problem @almirus has.

garry0garry commented 2 months ago

2024.5.1:

This error originated from a custom integration.

Logger: custom_components.tuya_local.device
Source: custom_components/tuya_local/device.py:555
integration: Tuya Local (documentation, issues)
First occurred: 11:55:51 AM (1 occurrences)
Last logged: 11:55:51 AM

Failed to refresh device state for Circuit breaker energy meter.
Logger: homeassistant
Source: helpers/frame.py:203
First occurred: 11:56:07 AM (1 occurrences)
Last logged: 11:56:07 AM

Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tuya_local/device.py", line 147, in actually_start
    self._refresh_task = self._hass.async_create_task(self.receive_loop())
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
    frame.report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()). Please report it to the author of the 'tuya_local' custom integration.

Logger: py.warnings
Source: runner.py:190
First occurred: 11:56:07 AM (1 occurrences)
Last logged: 11:56:07 AM

/usr/local/lib/python3.12/asyncio/base_events.py:1973: RuntimeWarning: coroutine 'TuyaLocalDevice.receive_loop' was never awaited handle = self._ready.popleft()
vampywiz17 commented 2 months ago

same problem:

2024-05-02 12:49:45.660 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 12:49:45.665 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 12:49:45.691 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 12:49:45.697 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 12:49:45.703 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 12:49:45.709 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 12:49:45.741 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 12:49:45.784 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/__init__.py, line 490: await hass.config_entries.async_forward_entry_setups(entry, entities) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-05-02 12:49:46.076 WARNING (SyncWorker_0) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:46.282 WARNING (SyncWorker_1) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:46.308 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:46.345 WARNING (SyncWorker_6) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:46.494 WARNING (SyncWorker_2) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:46.498 WARNING (SyncWorker_4) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:46.537 WARNING (SyncWorker_7) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:46.540 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:46.762 WARNING (SyncWorker_0) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:47.269 WARNING (SyncWorker_6) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:47.402 WARNING (SyncWorker_0) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:47.441 ERROR (MainThread) [custom_components.tuya_local.device] Failed to refresh device state for Aubess 2-gang.
2024-05-02 12:49:47.630 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:47.665 WARNING (SyncWorker_0) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:48.056 WARNING (SyncWorker_7) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:48.813 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues
2024-05-02 12:49:48.945 WARNING (SyncWorker_6) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:49.160 WARNING (SyncWorker_10) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:51.266 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON MaxCapacityMinModLevel_hb_u8: '{"avty_t": "OTGW/value/otgw-40F520047F7C", "dev": {"identifiers": "otgw-40F520047F7C", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway (OTGW)", "sw_version": "0.10.2+50c3ed2 (14-03-2023)"}, "uniq_id": "otgw-40F520047F7C-MaxCapacityMinModLevel_hb_u8", "device_class": "temperature", "name": "OTGW_MaxCapacityMinModLevel_hb_u8", "stat_t": "OTGW/value/otgw-40F520047F7C/MaxCapacityMinModLevel_hb_u8", "unit_of_measurement": "kW, "value_template": "{{ value }}" }'
2024-05-02 12:49:52.367 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.tuya_local.diagnostics',) in /usr/src/homeassistant/homeassistant/loader.py, line 1265: return importlib.import_module(f"{self.pkg_path}.{platform_name}") inside the event loop
2024-05-02 12:49:52.390 WARNING (SyncWorker_11) [homeassistant.helpers.frame] Detected that custom integration 'alarmo' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/alarmo/sensors.py, line 175: self._state_listener = async_track_state_change(, please report it to the author of the 'alarmo' custom integration
2024-05-02 12:49:52.975 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'openhasp' accesses hass.components.mqtt. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from mqtt directly at custom_components/openhasp/__init__.py, line 394: await self.hass.components.mqtt.async_subscribe(, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues
2024-05-02 12:49:53.421 ERROR (MainThread) [custom_components.openhasp.number] Could not restore page number for number.nappali_uj_page_number
2024-05-02 12:49:55.674 WARNING (MainThread) [homeassistant.helpers.entity] Update of fan.tmwf02_fan_controller is taking over 10 seconds
2024-05-02 12:49:55.723 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.doorbell_button is taking over 10 seconds
2024-05-02 12:49:55.755 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.moeshouse_rgb_socket_current is taking over 10 seconds
2024-05-02 12:49:55.792 WARNING (MainThread) [homeassistant.helpers.entity] Update of select.wall_switch_initial_state is taking over 10 seconds
2024-05-02 12:49:56.418 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for karacsonyfa @ 192.168.31.153: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.31.153', port=6053))]: [Errno 113] Connect call failed ('192.168.31.153', 6053) (SocketAPIError)
2024-05-02 12:49:56.418 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for spajz-lampa @ 192.168.31.122: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.31.122', port=6053))]: [Errno 113] Connect call failed ('192.168.31.122', 6053) (SocketAPIError)
2024-05-02 12:49:56.634 WARNING (SyncWorker_1) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:57.700 WARNING (SyncWorker_4) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:57.844 WARNING (SyncWorker_6) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:57.963 WARNING (SyncWorker_6) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:58.442 WARNING (SyncWorker_5) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:58.560 WARNING (SyncWorker_1) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:58.715 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:58.779 WARNING (SyncWorker_8) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:58.963 WARNING (SyncWorker_13) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:59.173 WARNING (SyncWorker_2) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:59.177 WARNING (SyncWorker_6) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:59.260 WARNING (SyncWorker_7) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:59.697 WARNING (SyncWorker_14) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:59.719 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:59.762 WARNING (SyncWorker_6) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:49:59.901 WARNING (SyncWorker_12) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:09.280 WARNING (SyncWorker_5) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:09.287 WARNING (SyncWorker_0) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:09.409 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:09.410 ERROR (MainThread) [custom_components.tuya_local.device] Failed to refresh device state for TMWF02 fan controller.
2024-05-02 12:50:09.528 WARNING (SyncWorker_7) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:09.529 ERROR (MainThread) [custom_components.tuya_local.device] Failed to refresh device state for Wall switch.
2024-05-02 12:50:09.996 WARNING (SyncWorker_10) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:10.138 WARNING (SyncWorker_6) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:10.139 ERROR (MainThread) [custom_components.tuya_local.device] Failed to refresh device state for Doorbell.
2024-05-02 12:50:37.749 WARNING (SyncWorker_12) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:47.766 WARNING (SyncWorker_13) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:47.801 WARNING (SyncWorker_0) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:50:57.946 WARNING (SyncWorker_12) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:03.144 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:39.149 WARNING (SyncWorker_13) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:39.272 WARNING (SyncWorker_1) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:49.288 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:54.514 WARNING (SyncWorker_8) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_write_ha_state from a thread at custom_components/tuya_local/device.py, line 424: entity.async_write_ha_state(), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:54.516 ERROR (MainThread) [custom_components.tuya_local.device] Failed to refresh device state for MoesHouse RGB socket.
2024-05-02 12:51:54.611 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 630: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues
2024-05-02 12:51:59.934 WARNING (SyncWorker_0) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:59.939 WARNING (SyncWorker_12) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:59.943 WARNING (SyncWorker_15) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:59.952 WARNING (SyncWorker_15) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:51:59.956 WARNING (SyncWorker_16) [homeassistant.helpers.frame] Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()), please report it to the author of the 'tuya_local' custom integration
2024-05-02 12:52:00.000 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tuya_local/device.py", line 147, in actually_start
    self._refresh_task = self._hass.async_create_task(self.receive_loop())
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
    frame.report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()). Please report it to the author of the 'tuya_local' custom integration.
2024-05-02 12:52:00.025 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.12/asyncio/base_events.py:1973: RuntimeWarning: coroutine 'TuyaLocalDevice.receive_loop' was never awaited
  handle = self._ready.popleft()

2024-05-02 12:52:00.025 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tuya_local/device.py", line 147, in actually_start
    self._refresh_task = self._hass.async_create_task(self.receive_loop())
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
    frame.report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()). Please report it to the author of the 'tuya_local' custom integration.
2024-05-02 12:52:00.030 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tuya_local/device.py", line 147, in actually_start
    self._refresh_task = self._hass.async_create_task(self.receive_loop())
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
    frame.report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()). Please report it to the author of the 'tuya_local' custom integration.
2024-05-02 12:52:00.035 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tuya_local/device.py", line 147, in actually_start
    self._refresh_task = self._hass.async_create_task(self.receive_loop())
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
    frame.report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()). Please report it to the author of the 'tuya_local' custom integration.
2024-05-02 12:52:00.053 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tuya_local/device.py", line 147, in actually_start
    self._refresh_task = self._hass.async_create_task(self.receive_loop())
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
    frame.report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'tuya_local' calls async_create_task from a thread at custom_components/tuya_local/device.py, line 147: self._refresh_task = self._hass.async_create_task(self.receive_loop()). Please report it to the author of the 'tuya_local' custom integration.
2024-05-02 12:54:44.377 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /addons/a7902f0f_otmonitor/changelog request 0, message='Attempt to decode JSON with unexpected mimetype: application/octet-stream', url=URL('http://172.30.32.2/addons/a7902f0f_otmonitor/changelog')
2024-05-02 12:54:44.378 WARNING (MainThread) [homeassistant.components.hassio.data] Could not fetch changelog for a7902f0f_otmonitor: 
Anj-0110 commented 2 months ago

Same problem here, however, I went into my back ups and reverted to the earlier version of CORE. Everything seems to be working as normal. A temp fix until code professionals are able to address...

SmartLifeAbbecourt commented 2 months ago

Hello, samedi for me, problem temporary solved by downgrade to HA to 2024.4.4

Best regards Philippe

Le jeu. 2 mai 2024, 15:42, Anj-0110 @.***> a écrit :

Same problem here, however, I went into my back ups and reverted to the earlier version of CORE. Everything seems to be working as normal. A temp fix until code professionals are able to address...

— Reply to this email directly, view it on GitHub https://github.com/make-all/tuya-local/issues/1871#issuecomment-2090532990, or unsubscribe https://github.com/notifications/unsubscribe-auth/BICBUQEHHJNOD52RHTDBROTZAI7CXAVCNFSM6AAAAABHCZOWL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJQGUZTEOJZGA . You are receiving this because you authored the thread.Message ID: @.***>

garry0garry commented 2 months ago

Restoring functionality for HA 2024.5.0:

  1. Update the integration.
  2. Reboot the HA.
  3. Reload the integration.
SmartLifeAbbecourt commented 2 months ago

Yes I did that but after reboot HA, integration not working, we have to deactivate and reactivate all devices at each HA rebooting

Le jeu. 2 mai 2024, 15:46, garry0garry @.***> a écrit :

Restoring functionality for HA 2024.5.0:

  1. Update the integration.
  2. Reboot the HA.
  3. Reload the integration.

— Reply to this email directly, view it on GitHub https://github.com/make-all/tuya-local/issues/1871#issuecomment-2090544357, or unsubscribe https://github.com/notifications/unsubscribe-auth/BICBUQEYGKNO3X2IS7A2JYLZAI7VBAVCNFSM6AAAAABHCZOWL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJQGU2DIMZVG4 . You are receiving this because you authored the thread.Message ID: @.***>

craibo commented 2 months ago

Hey @make-all

Firstly thank you for all the time you spend on this project.

I have opened a pull request that resolved the issues with HA 2024.5.0 in my environment. #1874

Hopefully this will fix other issues but I'm not able to test the other devices.

Any one can test these fixes using my fork and updating to the beta version 2024.5.2-1

peteS-UK commented 2 months ago

Hey @make-all

Firstly thank you for all the time you spend on this project.

I have opened a pull request that resolved the issues with HA 2024.5.0 in my environment. #1874

Hopefully this will fix other issues but I'm not able to test the other devices.

Any one can test these fixes using my fork and updating to the beta version 2024.5.2-1

Hey @craibo . I just had a look at your PR, but you still have "import_executor": false in the manifest, so it's still using the workaround from https://developers.home-assistant.io/blog/2024/03/09/import_executor_default/. Have you had a chance to test the fix without import_executor:false as I guess that's the "does it work properly with 2024.5. I'll give it a try tomorrow if no-one else is able (but I've downgraded to 2024.4 atm so can't test it)

broyuken commented 2 months ago

If someone can tell me what the fix without the manifest change is I would be happy to test. I'm on 2024.5.0 and things are working fine, aside from having to reload the integration upon boot. But I only have 1 device in there (the others are in local tuya) so it's a pretty easy and painless test for me.

make-all commented 2 months ago

Just removing that line from manifest JSON should be enough to check. It seems I misidentified the cause of HA no longer starting the coroutines from the event loop there, as that manifest entry did not seem to make a difference.

broyuken commented 2 months ago

So do I push the changes from your repo or from @craibo and modify the manifest?

make-all commented 2 months ago

If you want to test craibo's changes, then pull from his repo, and remove that line from the manifest.

maxosprojects commented 2 months ago

For the time being, a workaround is an automation like this:

alias: ++ Temporary workaround - reload tuya local devices after HA restarts
description: ""
trigger:
  - platform: homeassistant
    event: start
condition: []
action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: homeassistant.reload_config_entry
    target:
      device_id:
        - xxxx1
        - xxxx2
        ...
        - xxxxn
mode: single

Pick the devices to reload by switching editing of that automation from yaml to visual editor mode.

craibo commented 2 months ago

Hey @peteS-UK

I've update my PR #1876 and removed the "import_executor": false line from the manifest as suggested.

There is an updated beta release on my fork for this 2024.5.2-2 which you can use to test with.

I can confirm this is working on my instance with HA Core 2024.5.0

peteS-UK commented 2 months ago

Hey @peteS-UK

I've update my PR #1876 and removed the "import_executor": false line from the manifest as suggested.

There is an updated beta release on my fork for this 2024.5.2-2 which you can use to test with.

I can confirm this is working on my instance with HA Core 2024.5.0

Thanks @craibo . Yes, I can confirm that your 2024.5.2 changes fix the problem on HA 2024.5.0.

I just updated my extension to 2024.5.2 whilst running 2024.4, rebooted, updated HA to 2024.5.0, rebooted, restarted the VM (since 2024.5 doesn't seem to start properly otherwise) and now everything is working fine with no error messages. Not much testing yet, but all of my devices are online and seem to be working fine.

s1mpleman commented 2 months ago

Hey @peteS-UK

I've update my PR #1876 and removed the "import_executor": false line from the manifest as suggested.

There is an updated beta release on my fork for this 2024.5.2-2 which you can use to test with.

I can confirm this is working on my instance with HA Core 2024.5.0

Just tried this, it's working on 2024.5.0, no start up errors either. Thank you very much to you both! @craibo @peteS-UK

MihaiKrieger commented 2 months ago

Will this effort be merged in your repo @make-all ? It would be awesome.

peteS-UK commented 2 months ago

Will this effort be merged in your repo @make-all ? It would be awesome.

I'm sure Jason will take a look at this when he gets a chance to test it himself etc., but as he said a few comments ago, he's away at the moment so patience is a virtue ;-) If you need it now, it's only 2 mins work to change it yourself.

Krispkiwi commented 2 months ago

The latest update appears to keep some instability for now so I've downgraded back to 2024.4, looking forward to the patch

peteS-UK commented 2 months ago

The latest update appears to keep some instability for now so I've downgraded back to 2024.4, looking forward to the patch

Hi @Krispkiwi . Which update do you mean, 2024.5.1, or the 2024.5.2 beta? What instability are you seeing?

Krispkiwi commented 2 months ago

The latest update appears to keep some instability for now so I've downgraded back to 2024.4, looking forward to the patch

Hi @Krispkiwi . Which update do you mean, 2024.5.1, or the 2024.5.2 beta? What instability are you seeing?

I've been using 2024.5.1, noticing my devices are dropping to unavailable and need to be reloaded to re-establish the connection all the time.

peteS-UK commented 2 months ago

Yep. Have a read back in the thread. 2024.5.1 doesn't fix the problem, but the 2024.5.2 beta seems to fix it.

Aironside commented 2 months ago

I apologize, but I didn't understand much (I'm a newbie). Even if temporarily, may I know what file needs to be modified and what change needs to be made to resolve the problem? Thank you

broyuken commented 2 months ago

I modified the manifest and device.py files with the changes from @craibo's fork. Rebooted and now my devices show up as available on a reboot. @Aironside if you're a newbie you may want to just stick with the automation idea from a few comments up to reload the integration on HA startup that @maxosprojects commented.

Aironside commented 2 months ago

@broyuken I will follow your advice, thanks.

cmgestevao commented 2 months ago

Hi @make-all, thank you for your time on this project! Hi @craibo, thank you for the update, its working now on core 2024.5.0!

Best regards to all.