Followed the HACS install method and frontend integration to the letter - If there's any assumed knowledge around either, that's a problem. The power socket I am trying to integrate is not showing up.
I am getting the following in the HA log at startup:
2020-07-03 14:50:46 ERROR (MainThread) [custom_components.tuyalocal.pytuya] Unexpected status() payload=b'\x13\xca\x1a\xf0\xc16\xf3YR\xd7\x17\xd2\xd2\xa1\xeb\x9a\xb5\xc8\xa7\x83\xa04`G4\xe5\t6\xc6\xf1\x15'
2020-07-03 14:50:46 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tuyalocal platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform
await asyncio.gather(pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity
entity.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 297, in async_write_ha_state
self._async_write_ha_state() # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 324, in _async_write_ha_state
attr.update(self.device_state_attributes or {})
File "/config/custom_components/tuyalocal/switch.py", line 183, in device_state_attributes
attrs[ATTR_CURRENT] = "{}".format(self._status['dps'][self._attr_current])
TypeError: byte indices must be integers or slices, not str
Followed the HACS install method and frontend integration to the letter - If there's any assumed knowledge around either, that's a problem. The power socket I am trying to integrate is not showing up.
I am getting the following in the HA log at startup:
2020-07-03 14:50:46 ERROR (MainThread) [custom_components.tuyalocal.pytuya] Unexpected status() payload=b'\x13\xca\x1a\xf0\xc16\xf3YR\xd7\x17\xd2\xd2\xa1\xeb\x9a\xb5\xc8\xa7\x83\xa04`G4\xe5\t6\xc6\xf1\x15' 2020-07-03 14:50:46 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tuyalocal platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform await asyncio.gather(pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 443, in _async_add_entity entity.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 297, in async_write_ha_state self._async_write_ha_state() # type: ignore File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 324, in _async_write_ha_state attr.update(self.device_state_attributes or {}) File "/config/custom_components/tuyalocal/switch.py", line 183, in device_state_attributes attrs[ATTR_CURRENT] = "{}".format(self._status['dps'][self._attr_current]) TypeError: byte indices must be integers or slices, not str