marthoc/kuna

Lost camera entities.

boctok opened this issue · 1 comments

I have two Kuna "Porch Light" cameras. A few days ago (likely after the HA update), the camera entities disappeared from HA. I uninstalled and reinstalled and the integration only creates the switch entity and the sensor (motion) entity for both cameras with no camera entities created.

I set the logger to debug and got this in the logs:

kuna: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 684, in async_device_update await task File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/kuna/camera.py", line 100, in update self.is_streaming = True AttributeError: can't set attribute

I was able to fix the error and get the cameras back by changing line 100 in camera.py from
self.is_streaming = True to
self._is_streaming = True