Skip to content
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

Task exception was never retrieved (HA 103.0) #5

Open
RoSulek1 opened this issue Dec 23, 2019 · 1 comment
Open

Task exception was never retrieved (HA 103.0) #5

RoSulek1 opened this issue Dec 23, 2019 · 1 comment

Comments

@RoSulek1
Copy link

I have some error in HA.
I see the friendly name in group of switches, but not in entities (as switch)

Unexpected status() payload=b'\x10\xe2C\xd9\xff\xce\xc5|\xf8\xee\xd2\xf2\xe4sW\xc9\xd2\x84\x84\xca\xd7{N1$\xee\xcc>bbej'

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 408, in _async_add_entity await entity.async_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 286, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 328, in _async_write_ha_state attr.update(self.device_state_attributes or {}) File "/config/custom_components/localtuya/switch.py", line 158, in device_state_attributes attrs[ATTR_CURRENT] = "{}".format(self._status['dps'][self._attr_current]) TypeError: byte indices must be integers or slices, not str

@Nantero1
Copy link

Nantero1 commented May 28, 2020

+1
I see this error with new Gosund switches using the protocol version 2.2 according to the grabbed preferences.xml

2020-05-28 19:51:55 ERROR (SyncWorker_2) [custom_components.localtuya.pytuya] Unexpected status() payload=b'3.3\x00\x00\x00\x00\x00\x00\x05\x0b\x00\x00\x00\x011\xbb\xc2\x9ce\xc1\xf3\xbe\x07\xcd\xed\xea\xccc\x1dy\xaf\x8a\xb1\xd4\xc2\xbf\x98\xf9\xca\xfa\x17\x8b\xae-\xa5\x0f\xa6&\xc7\x05\xc7\xa9\x02\xf4\x1f\x0c\xce*`\xf7#6\xef\\1\x05\xe3\x99X ,\xa9!\x02>,\xb0\x8d_\xdf\x92\x9a\x92\xb4\x13\x0f* R\xa1j\xe5@.'
Failed to receive data from <IP_ADDRESS>. Raising Exception.
Failed to update status of device [<IP_ADDRESS>]

Seems to be an issue: jasonacox/powermonitor#3

UPDATE: solved it by changing protocol_version: 3.3 in my config. It seems the protocol version is listed wrongly in the preferences.yaml. Hope this comment helps someone one day :)

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

No branches or pull requests

2 participants