Error adding entities for domain switch with platform mycamera
Error while setting up mycamera platform for switch
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 192, in send
data, addr = s.recvfrom(1024)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 192, in send
data, addr = s.recvfrom(1024)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 192, in send
data, addr = s.recvfrom(1024)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 192, in send
data, addr = s.recvfrom(1024)
socket.timeout: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
sstate = self.state
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 676, in state
return STATE_ON if self.is_on else STATE_OFF
File "/config/custom_components/mycamera/switch.py", line 47, in is_on
return self._camera.status().power
File "/config/custom_components/mycamera/my_camera.py", line 60, in status
values = self.send("get_prop", properties)
File "/usr/local/lib/python3.8/site-packages/miio/device.py", line 143, in send
return self._protocol.send(
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 232, in send
return self.send(
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 232, in send
return self.send(
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 232, in send
return self.send(
File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 240, in send
raise DeviceException("No response from the device") from ex
miio.exceptions.DeviceException: No response from the device