Skip to content

Fix for issue #186 (covers start as offline) #189

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

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

rospogrigio
Copy link
Owner

This was due to wrong initialization values for _timer_start and _previous_state, should be fixed now.

@rospogrigio
Copy link
Owner Author

Dear @darth-aragoth and @makis , can you please check this PR and see if it fixes issue #186 ?
Thank you

@rospogrigio rospogrigio requested a review from postlund November 24, 2020 11:11
@rospogrigio rospogrigio mentioned this pull request Nov 24, 2020
@darth-aragoth
Copy link

Hello, it looks like this issue is fixed. Thank you.

@rospogrigio rospogrigio merged commit a74af93 into master Nov 24, 2020
@rospogrigio rospogrigio deleted the cover_fix_time_nonetype branch November 24, 2020 21:50
@rospogrigio
Copy link
Owner Author

Merged #189 into master.

@userMak
Copy link

userMak commented Nov 26, 2020

Hi
apparently there is still something wrong.
Today some of my covers where grayed out and I could not use them at all, even with the slider
The logs are

og Details (ERROR)
Logger: homeassistant
Source: components/tuya/__init__.py:146
First occurred: 7:44:52 AM (17 occurrences)
Last logged: 9:50:01 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/tuya/__init__.py", line 153, in async_poll_devices_update
    device_list = await hass.async_add_executor_job(_get_updated_devices)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tuya/__init__.py", line 146, in _get_updated_devices
    tuya.poll_devices_update()
  File "/usr/local/lib/python3.8/site-packages/tuyaha/tuyaapi.py", line 166, in poll_devices_update
    return self.discover_devices()
  File "/usr/local/lib/python3.8/site-packages/tuyaha/tuyaapi.py", line 207, in discover_devices
    devices = self.discovery()
  File "/usr/local/lib/python3.8/site-packages/tuyaha/tuyaapi.py", line 188, in discovery
    response = self._request("Discovery", "discovery")
  File "/usr/local/lib/python3.8/site-packages/tuyaha/tuyaapi.py", line 267, in _request
    self._raise_frequently_invoke(
  File "/usr/local/lib/python3.8/site-packages/tuyaha/tuyaapi.py", line 292, in _raise_frequently_invoke
    raise TuyaFrequentlyInvokeException(message)
tuyaha.tuyaapi.TuyaFrequentlyInvokeException: Method [Discovery] fails 1 time(s) using poll interval 60.0 - error: you can discovery once in 600 seconds

and

Log Details (ERROR)
Logger: homeassistant.util.logging
Source: util/logging.py:108
First occurred: 7:39:52 AM (1 occurrences)
Last logged: 7:39:52 AM

Exception in _update_handler when dispatching 'localtuya_50758014840d8e91f036': ({},) Traceback (most recent call last): File "/config/custom_components/localtuya/common.py", line 245, in _update_handler self.status_updated() File "/config/custom_components/localtuya/cover.py", line 168, in status_updated if self._state.isupper(): AttributeError: 'NoneType' object has no attribute 'isupper'

@userMak
Copy link

userMak commented Nov 26, 2020

Screenshot 2020-11-26 094846

SKULSHADY pushed a commit to SKULSHADY/localtuya that referenced this pull request Dec 28, 2024
SKULSHADY pushed a commit to SKULSHADY/localtuya that referenced this pull request Dec 28, 2024
SKULSHADY pushed a commit to SKULSHADY/localtuya that referenced this pull request Dec 28, 2024
SKULSHADY pushed a commit to SKULSHADY/localtuya that referenced this pull request Dec 28, 2024
SKULSHADY pushed a commit to SKULSHADY/localtuya that referenced this pull request Dec 28, 2024
SKULSHADY pushed a commit to SKULSHADY/localtuya that referenced this pull request Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants