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

Initialize properly Camera class #779

Closed
wants to merge 1 commit into from

Conversation

edenhaus
Copy link

Fixes #778

@tjorim
Copy link

tjorim commented Oct 30, 2024

I made the change at https://github.com/Tasshack/dreame-vacuum/blob/dev/custom_components/dreame_vacuum/camera.py#L478 because I'm using the beta.
However now I have an issue with _access_token_update_counter:

Logger: homeassistant.components.camera
Source: helpers/entity_platform.py:365
integration: Camera (documentation, issues)
First occurred: 23:06:11 (1 occurrences)
Last logged: 23:06:11

Error while setting up dreame_vacuum platform for camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 365, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/dreame_vacuum/camera.py", line 369, in async_setup_entry
    update_map_cameras()
  File "/config/custom_components/dreame_vacuum/camera.py", line 405, in async_update_map_cameras
    DreameVacuumCameraEntity(
  File "/config/custom_components/dreame_vacuum/camera.py", line 479, in __init__
    Camera.__init__(self)
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 483, in __init__
    self.async_update_token()
  File "/config/custom_components/dreame_vacuum/camera.py", line 646, in async_update_token
    if self._access_token_update_counter:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DreameVacuumCameraEntity' object has no attribute '_access_token_update_counter'

@Tasshack
Copy link
Owner

Tasshack commented Nov 1, 2024

This not how I like to solve this issue.

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

Successfully merging this pull request may close these issues.

AttributeError: object has no attribute '_webrtc_provider'
3 participants