You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If light.turn_off is called with entity_id: all, it will generate TypeError: 'bool' object is not subscriptable` in tapo_control
Reproduction Steps
To reproduce, need a tapo camera that has a light entity. Then call light.turn_off from developer tools -> actions
# YAML snippet for Developer Tools -> Actions
action: light.turn_off
data: {}
target:
entity_id: all
Expected behavior
Tapo controls should not be able to make light.turn_off for all entities fail.
If applicable, add error logs.
Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:525
First occurred: 11:31:47 AM (2 occurrences)
Last logged: 11:31:54 AM
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'bool' object is not subscriptable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1021, in entity_service_call
raise result from None
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1610, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 639, in async_handle_light_off_service
await light.async_turn_off(**filter_turn_off_params(light, params))
File "/config/custom_components/tapo_control/light.py", line 95, in async_turn_off
if str(camData["whitelampStatus"]) == "1":
~~~~~~~^^^^^^^^^^^^^^^^^^^
TypeError: 'bool' object is not subscriptable
Device Firmware
1.2.2 Build 240905 Rel.41780n
Integration Version
5.6.3
Using stream component
No
Does camera work via official integrations?
Yes
Camera has all attributes filled out in developer tools
Yes
HASS Environment
Home Assistant OS in VM on x86_64 (KVM)
Search for similar issues
Yes
Additional information
Only cameras connected right now are two C120's with the same firmware version.
The text was updated successfully, but these errors were encountered:
rct
changed the title
light.turn_off all results in TypeError: bool object not subscriptable in tape control
light.turn_off all results in TypeError: bool object not subscriptable in tapo_control
Oct 23, 2024
Some notes from additional testing. I get the same TypeError: 'bool' object is not subscriptable error when trying to turn the light entity on for one of my C120's. The light entity for the other C120 works correctly.
Description
If
light.turn_off
is called withentity_id: all, it will generate
TypeError: 'bool' object is not subscriptable` in tapo_controlReproduction Steps
To reproduce, need a tapo camera that has a light entity. Then call light.turn_off from developer tools -> actions
Expected behavior
Tapo controls should not be able to make
light.turn_off
for all entities fail.If applicable, add error logs.
Device Firmware
1.2.2 Build 240905 Rel.41780n
Integration Version
5.6.3
Using stream component
No
Does camera work via official integrations?
Yes
Camera has all attributes filled out in developer tools
Yes
HASS Environment
Home Assistant OS in VM on x86_64 (KVM)
Search for similar issues
Yes
Additional information
Only cameras connected right now are two C120's with the same firmware version.
The text was updated successfully, but these errors were encountered: