Open tjorim opened 3 weeks ago
Not calling the parent class init function is very much intentional but I cannot remember the actual reason behind it.
Hi @Tasshack , Your comment below referenced issue #779 and in the issue itself, sounds a bit like #779 will not be merged. Could you please clarify? Should it be closed, will this update also make it into the next pre-release version?
Thanks a lot for all your efforts and the pre-release version for the new Dreame vacuuums Cheers, Mel
To resolve the issue temporarily, I added the missing attributes to the DreameVacuumCameraEntity class in the camera.py file of the integration. Specifically, I added the following lines to the class:
_webrtc_provider = None
_legacy_webrtc_provider = None
_supports_native_sync_webrtc = False
_supports_native_async_webrtc = False
After adding these attributes, the errors stopped appearing in the logs, and the integration started working as expected.
Hi @taifunk,
Thanks a lot, it is working.
_webrtc_provider = None _legacy_webrtc_provider = None _supports_native_sync_webrtc = False _supports_native_async_webrtc = False
Hi @taifunk, thanks that worked nicely. Maybe this can make it into a future release?
Hi there, can you please tell exactly where I should add those values in the camera.py file?
Hi there, can you please tell exactly where I should add those values in the camera.py file?
This is my version:
Thanks, working!
@taifunk since you deserve the credit, you should create a PR to fix this
Dreame L10 Prime doesn't have a camera.
2024-11-23 17:56:15.455 ERROR (MainThread) [homeassistant.components.camera] Error adding entity camera.dreamebot_l10_prime_map for domain camera with platform dreame_vacuum
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 599, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 918, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
await self.async_internal_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 791, in async_internal_added_to_hass
await self.async_refresh_providers(write_state=False)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 799, in async_refresh_providers
old_provider = self._webrtc_provider
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DreameVacuumCameraEntity' object has no attribute '_webrtc_provider'
2024-11-23 17:56:15.487 ERROR (MainThread) [homeassistant.components.camera] Error adding entity camera.dreamebot_l10_prime_map_data for domain camera with platform dreame_vacuum
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 599, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 918, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
await self.async_internal_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 791, in async_internal_added_to_hass
await self.async_refresh_providers(write_state=False)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 799, in async_refresh_providers
old_provider = self._webrtc_provider
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DreameVacuumCameraEntity' object has no attribute '_webrtc_provider'
2024-11-23 17:56:19.159 ERROR (MainThread) [homeassistant.components.camera] Error adding entity camera.dreamebot_l10_prime_map_1 for domain camera with platform dreame_vacuum
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 599, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 918, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
await self.async_internal_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 791, in async_internal_added_to_hass
await self.async_refresh_providers(write_state=False)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 799, in async_refresh_providers
old_provider = self._webrtc_provider
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DreameVacuumCameraEntity' object has no attribute '_webrtc_provider'
The problem still persists on the Home Assistant Core 2024.11.3?
The problem still persists on the Home Assistant Core 2024.11.3?
yes
Dreame L10 Prime doesn't have a camera.
2024-11-23 17:56:15.455 ERROR (MainThread) [homeassistant.components.camera] Error adding entity camera.dreamebot_l10_prime_map for domain camera with platform dreame_vacuum Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 599, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 918, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish await self.async_internal_added_to_hass() File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 791, in async_internal_added_to_hass await self.async_refresh_providers(write_state=False) File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 799, in async_refresh_providers old_provider = self._webrtc_provider ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'DreameVacuumCameraEntity' object has no attribute '_webrtc_provider' 2024-11-23 17:56:15.487 ERROR (MainThread) [homeassistant.components.camera] Error adding entity camera.dreamebot_l10_prime_map_data for domain camera with platform dreame_vacuum Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 599, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 918, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish await self.async_internal_added_to_hass() File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 791, in async_internal_added_to_hass await self.async_refresh_providers(write_state=False) File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 799, in async_refresh_providers old_provider = self._webrtc_provider ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'DreameVacuumCameraEntity' object has no attribute '_webrtc_provider' 2024-11-23 17:56:19.159 ERROR (MainThread) [homeassistant.components.camera] Error adding entity camera.dreamebot_l10_prime_map_1 for domain camera with platform dreame_vacuum Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 599, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 918, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish await self.async_internal_added_to_hass() File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 791, in async_internal_added_to_hass await self.async_refresh_providers(write_state=False) File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 799, in async_refresh_providers old_provider = self._webrtc_provider ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'DreameVacuumCameraEntity' object has no attribute '_webrtc_provider'
This is the solution: https://github.com/Tasshack/dreame-vacuum/issues/778#issuecomment-2471687143
Describe the bug Getting the following webrtc error since the introduction in HA 2024.11
To Reproduce Update HA core to 2024.11.0b0 and check the logs.
Expected behavior No errors in the log.
Additional Information (please complete the following information)
Error adding entity camera.d10s_pro_map for domain camera with platform dreame_vacuum Error adding entity camera.d10s_pro_map_1 for domain camera with platform dreame_vacuum Error adding entity camera.d10s_pro_map_2 for domain camera with platform dreame_vacuum Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 599, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 918, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish await self.async_internal_added_to_hass() File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 782, in async_internal_added_to_hass await self.async_refresh_providers(write_state=False) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 790, in async_refresh_providers old_provider = self._webrtc_provider ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'DreameVacuumCameraEntity' object has no attribute '_webrtc_provider'