core: TP Link Bulb - returning error but still working: Failed to call service light/turn_on
The problem
When I turn my TP-Link bulb on/off through home assistant, it works but I receive an error message. This resolves after reloading the integration or restarting power to the bulb.
Failed to call service light/turn_off. No required smartlife.iot.smartbulb.lightingservice in response: {'smartlife.iot.common.emeter': {'get_realtime': {'power_mw': 0, 'total_wh': 42, 'err_code': 0}, 'get_daystat': {'day_list': [{'year': 2024, 'month': 1, 'day': 1, 'energy_wh': 19}, {'year': 2024, 'month': 1, 'day': 2, 'energy_wh': 81}, {'year': 2024, 'month': 1, 'day': 3, 'energy_wh': 113}, {'year': 2024, 'month': 1, 'day': 4, 'energy_wh': 24}], 'err_code': 0}, 'get_monthstat': {'month_list': [{'year': 2024, 'month': 1, 'energy_wh': 237}], 'err_code': 0}}, 'smartlife.iot.common.cloud': {'get_info': {'username': 'REDACTED@gmail.com', 'server': 'n-devs.tplinkcloud.com', 'binded': 1, 'cld_connection': 1, 'illegalType': 0, 'stopConnect': 0, 'tcspStatus': 1, 'fwDlPage': '', 'tcspInfo': '', 'fwNotifyType': -1, 'err_code': 0}}}
This only occurs with one bulb type, the rest of my bulbs and switches work flawlessly: KL 125 Hardware Version 3.0 Firmware Version 1.0.13
What version of Home Assistant Core has the issue?
core-2024.1.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
TP-Link Kasa Smart
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tplink
Diagnostics information
config_entry-tplink-63ebb12c9539f3d5a87a6af29a860c40.json (1).txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:238
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: January 3, 2024 at 9:16:37 PM (26 occurrences)
Last logged: 7:27:52 PM
[546882695616] No required smartlife.iot.smartbulb.lightingservice in response: {'smartlife.iot.common.emeter': {'get_realtime': {'power_mw': 0, 'total_wh': 42, 'err_code': 0}, 'get_daystat': {'day_list': [{'year': 2024, 'month': 1, 'day': 3, 'energy_wh': 113}, {'year': 2024, 'month': 1, 'day': 1, 'energy_wh': 19}, {'year': 2024, 'month': 1, 'day': 2, 'energy_wh': 81}, {'year': 2024, 'month': 1, 'day': 4, 'energy_wh': 24}], 'err_code': 0}, 'get_monthstat': {'month_list': [{'year': 2024, 'month': 1, 'energy_wh': 237}], 'err_code': 0}}, 'smartlife.iot.common.cloud': {'get_info': {'username': 'REDACTED@gmail.com', 'server': 'n-devs.tplinkcloud.com', 'binded': 1, 'cld_connection': 1, 'illegalType': 0, 'stopConnect': 0, 'tcspStatus': 1, 'fwDlPage': '', 'tcspInfo': '', 'fwNotifyType': -1, 'err_code': 0}}}
[546884948032] No required smartlife.iot.smartbulb.lightingservice in response: {'smartlife.iot.common.emeter': {'get_realtime': {'power_mw': 0, 'total_wh': 42, 'err_code': 0}, 'get_daystat': {'day_list': [{'year': 2024, 'month': 1, 'day': 3, 'energy_wh': 113}, {'year': 2024, 'month': 1, 'day': 1, 'energy_wh': 19}, {'year': 2024, 'month': 1, 'day': 2, 'energy_wh': 81}, {'year': 2024, 'month': 1, 'day': 4, 'energy_wh': 24}], 'err_code': 0}, 'get_monthstat': {'month_list': [{'year': 2024, 'month': 1, 'energy_wh': 237}], 'err_code': 0}}, 'smartlife.iot.common.cloud': {'get_info': {'username': 'REDACTED@gmail.com', 'server': 'n-devs.tplinkcloud.com', 'binded': 1, 'cld_connection': 1, 'illegalType': 0, 'stopConnect': 0, 'tcspStatus': 1, 'fwDlPage': '', 'tcspInfo': '', 'fwNotifyType': -1, 'err_code': 0}}}
[546884948032] No required smartlife.iot.smartbulb.lightingservice in response: {'smartlife.iot.common.emeter': {'get_realtime': {'power_mw': 900, 'total_wh': 42, 'err_code': 0}, 'get_daystat': {'day_list': [{'year': 2024, 'month': 1, 'day': 3, 'energy_wh': 113}, {'year': 2024, 'month': 1, 'day': 1, 'energy_wh': 19}, {'year': 2024, 'month': 1, 'day': 2, 'energy_wh': 81}, {'year': 2024, 'month': 1, 'day': 4, 'energy_wh': 24}], 'err_code': 0}, 'get_monthstat': {'month_list': [{'year': 2024, 'month': 1, 'energy_wh': 237}], 'err_code': 0}}, 'smartlife.iot.common.cloud': {'get_info': {'username': 'REDACTED@gmail.com', 'server': 'n-devs.tplinkcloud.com', 'binded': 1, 'cld_connection': 1, 'illegalType': 0, 'stopConnect': 0, 'tcspStatus': 1, 'fwDlPage': '', 'tcspInfo': '', 'fwNotifyType': -1, 'err_code': 0}}}
[546742296000] No required smartlife.iot.smartbulb.lightingservice in response: {'smartlife.iot.common.emeter': {'get_realtime': {'power_mw': 0, 'total_wh': 42, 'err_code': 0}, 'get_daystat': {'day_list': [{'year': 2024, 'month': 1, 'day': 1, 'energy_wh': 19}, {'year': 2024, 'month': 1, 'day': 2, 'energy_wh': 81}, {'year': 2024, 'month': 1, 'day': 3, 'energy_wh': 113}, {'year': 2024, 'month': 1, 'day': 4, 'energy_wh': 24}], 'err_code': 0}, 'get_monthstat': {'month_list': [{'year': 2024, 'month': 1, 'energy_wh': 237}], 'err_code': 0}}, 'smartlife.iot.common.cloud': {'get_info': {'username': 'REDACTED@gmail.com', 'server': 'n-devs.tplinkcloud.com', 'binded': 1, 'cld_connection': 1, 'illegalType': 0, 'stopConnect': 0, 'tcspStatus': 1, 'fwDlPage': '', 'tcspInfo': '', 'fwNotifyType': -1, 'err_code': 0}}}
[546742654656] No required smartlife.iot.smartbulb.lightingservice in response: {'smartlife.iot.common.emeter': {'get_realtime': {'power_mw': 0, 'total_wh': 42, 'err_code': 0}, 'get_daystat': {'day_list': [{'year': 2024, 'month': 1, 'day': 3, 'energy_wh': 113}, {'year': 2024, 'month': 1, 'day': 1, 'energy_wh': 19}, {'year': 2024, 'month': 1, 'day': 2, 'energy_wh': 81}, {'year': 2024, 'month': 1, 'day': 4, 'energy_wh': 24}], 'err_code': 0}, 'get_monthstat': {'month_list': [{'year': 2024, 'month': 1, 'energy_wh': 237}], 'err_code': 0}}, 'smartlife.iot.common.cloud': {'get_info': {'username': 'REDACTED@gmail.com', 'server': 'n-devs.tplinkcloud.com', 'binded': 1, 'cld_connection': 1, 'illegalType': 0, 'stopConnect': 0, 'tcspStatus': 1, 'fwDlPage': '', 'tcspInfo': '', 'fwNotifyType': -1, 'err_code': 0}}}
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2173, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2210, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 882, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 624, in async_handle_light_on_service
await light.async_turn_on(**filter_turn_on_params(light, params))
File "/usr/src/homeassistant/homeassistant/components/group/light.py", line 174, in async_turn_on
await self.hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 2173, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2210, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 907, in entity_service_call
raise result from None
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1493, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 624, in async_handle_light_on_service
await light.async_turn_on(**filter_turn_on_params(light, params))
File "/usr/src/homeassistant/homeassistant/components/tplink/entity.py", line 26, in _async_wrap
await func(self, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/tplink/light.py", line 245, in async_turn_on
await self._async_turn_on_with_brightness(brightness, transition)
File "/usr/src/homeassistant/homeassistant/components/tplink/light.py", line 230, in _async_turn_on_with_brightness
await self.device.turn_on(transition=transition)
File "/usr/local/lib/python3.11/site-packages/kasa/smartbulb.py", line 518, in turn_on
return await self.set_light_state({"on_off": 1}, transition=transition)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/kasa/smartbulb.py", line 353, in set_light_state
light_state = await self._query_helper(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/kasa/smartdevice.py", line 275, in _query_helper
raise SmartDeviceException(f"No required {target} in response: {response}")
kasa.exceptions.SmartDeviceException: No required smartlife.iot.smartbulb.lightingservice in response: {'smartlife.iot.common.emeter': {'get_realtime': {'power_mw': 0, 'total_wh': 18, 'err_code': 0}, 'get_daystat': {'day_list': [{'year': 2024, 'month': 1, 'day': 1, 'energy_wh': 19}, {'year': 2024, 'month': 1, 'day': 2, 'energy_wh': 81}, {'year': 2024, 'month': 1, 'day': 3, 'energy_wh': 113}], 'err_code': 0}, 'get_monthstat': {'month_list': [{'year': 2024, 'month': 1, 'energy_wh': 213}], 'err_code': 0}}, 'smartlife.iot.common.cloud': {'get_info': {'username': 'REDACTED@gmail.com', 'server': 'n-devs.tplinkcloud.com', 'binded': 1, 'cld_connection': 1, 'illegalType': 0, 'stopConnect': 0, 'tcspStatus': 1, 'fwDlPage': '', 'tcspInfo': '', 'fwNotifyType': -1, 'err_code': 0}}}
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 46 (29 by maintainers)
This will be fixed in the next library bump of
python-kasaWatch the changelog in the next ha release for a bump of the python-kasa version to know when its available