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

Camera: 'bool' object is not subscriptable #428

Closed
vdiogo opened this issue Oct 18, 2023 · 2 comments
Closed

Camera: 'bool' object is not subscriptable #428

vdiogo opened this issue Oct 18, 2023 · 2 comments
Labels
Bug Something isn't working Fixed Bug has been fixed.

Comments

@vdiogo
Copy link

vdiogo commented Oct 18, 2023

Description

I get the following error multiple times during the day:
Unexpected error fetching Tapo resource status data: 'bool' object is not subscriptable

I have not identified lack of connection with the cameras when I need to display them in home assistant

Reproduction Steps

Go to Configuration --> System --> Logs

Expected behavior

Would not expect this error to display

If applicable, add error logs.

Este erro teve origem numa integração personalizada.

Logger: custom_components.tapo_control
Source: helpers/update_coordinator.py:290
Integration: Tapo: Cameras Control (documentation, issues)
First occurred: 17 de outubro de 2023 às 18:53:21 (17 occurrences)
Last logged: 08:29:26

Unexpected error fetching Tapo resource status data: 'bool' object is not subscriptable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 246, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tapo_control/__init__.py", line 434, in async_update_data
    entity["entity"].updateTapo(
  File "/config/custom_components/tapo_control/sensor.py", line 130, in updateTapo
    if len(camData["sdCardData"]) > 0:
           ~~~~~~~^^^^^^^^^^^^^^
TypeError: 'bool' object is not subscriptable

Device Firmware

1.3.6 Build 230424 Rel.77225n(4555)

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

Home Assistant Supervised

Search for similar issues

Yes

Additional information

Looks similar to #393

@JurajNyiri
Copy link
Owner

Please enable debug logs.

logger:
  default: critical
  logs:
    custom_components.tapo_control: debug

Upload the full log here once the error happens.

@JurajNyiri
Copy link
Owner

@JurajNyiri JurajNyiri added Bug Something isn't working Fixed Bug has been fixed. labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Fixed Bug has been fixed.
Projects
None yet
Development

No branches or pull requests

2 participants