-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appears as unavailable after restarting Home Assistant #1751
Comments
Yeah I see this also. When HA is rebooted localtuya devices are unavailable. If I then turn a switch on either physically or via tuya cloud app, the entities are then updated and usable in HA. |
Do you get any log entries, guys? |
Just have seen the same behavior after a power outage. Logs are: possibly related: Exception in _update_handler when dispatching 'localtuya_bf2b2e3cd504166f40hai9': ({'2': 'forward', '3': 30},) Traceback (most recent call last): File "/config/custom_components/localtuya/common.py", line 411, in _update_handler self.status_updated() File "/config/custom_components/localtuya/cover.py", line 195, in status_updated if self._state.isupper(): ^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'isupper' After using smart life app for any input entities returned to correct states. |
I was just about to come here to mention this too. It's been this way for months. After every HA restart, I have to remember to reload the LocalTuya integration and this fixes it (yes, I know I could automate that, but it seems to be papering over the cracks). Once reloaded, things seem fine, but it is required every time. |
Moved to xZetsubou fork. Some interesting new options and a lot of issues solved! Would make sense to merch this two. |
Same here. After reloading the integration after a reboot, it works again. Here is my log entry, just FYI in case it helps: Exception in new_entity_handler when dispatching 'localtuya_entity[redacted]': ('switch.woox_smartplug',) Traceback (most recent call last): File "/config/custom_components/localtuya/common.py", line 261, in _new_entity_handler self._dispatch_status() File "/config/custom_components/localtuya/common.py", line 349, in _dispatch_status async_dispatcher_send(self._hass, signal, self._status) File "/usr/src/homeassistant/homeassistant/helpers/dispatcher.py", line 214, in async_dispatcher_send hass.verify_event_loop_thread("async_dispatcher_send") File "/usr/src/homeassistant/homeassistant/core.py", line 463, in verify_event_loop_thread frame.report_non_thread_safe_operation(what) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 225, in report_non_thread_safe_operation report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 159, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 197, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'localtuya' calls async_dispatcher_send from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#async_dispatcher_send at custom_components/localtuya/common.py, line 349: async_dispatcher_send(self._hass, signal, self._status). Please report it to the author of the 'localtuya' custom integration. |
It never allows me to reload the integration, come on... when I hit reload it asks me to restart home assistant and a yellow contour line appears on the integration. |
Same here but only with 2 valves (seen as switches). All lights entities are working fine. After each restart I go to Configure ==> Edit ==> select the valves ==> and just save it. They are reloaded and working fine until next restart. This is from this morning restart:
|
Having this issue with my curtain motors. Moving them once with Tuya app seems to fix. Not sure when it stopped working. How can I test the fix?… #1762 |
I have applied the changes to common.py in #1762 and it does indeed resolve this issue along with #1761. Thank you @fabio-garavini! |
Exactly my problem. At every restart of HA many devices are unaivalable. Manually restarting the integration solved the problem. |
Try this @fablav76 |
After restarting home assistant the devices appear as unavailable, curiously if the device in question goes to the Tuya integration in which it appears as available and you turn it on and off then it appears in your local location. I don't know why it is, but it happens to me quite frequently. Any solution ? I have everything updated, integration, Home assistant etc.
The text was updated successfully, but these errors were encountered: