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

Exception thrown in error handling of failed service call 3.0.0 Beta 3 #122

Closed
ismarslomic opened this issue Feb 3, 2024 · 1 comment
Closed

Comments

@ismarslomic
Copy link
Collaborator

When calling (deprecated) service update_health_status, which fails, I see following error in logs. I think we are using wrong variable, we should use service_status instead of status.

2024-02-03 20:05:31.237 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140181863512384] string indices must be integers, not 'str'
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 2149, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/jlrincontrol/coordinator.py", line 597, in async_call_service
success = await jlr_service.async_call_service(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/jlrincontrol/services.py", line 140, in async_call_service
success = await self.async_monitor_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/jlrincontrol/services.py", line 194, in async_monitor_service_call
status["vehicleId"] = field_mask(status["vehicleId"], 3, 2)
~~~~~~^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'
@ismarslomic
Copy link
Collaborator Author

Fixed and verified in dev branch.

Now following error message is logged:

2024-02-03 20:30:26.772 ERROR (MainThread) [custom_components.jlrincontrol.services] JLR InControl service call get_health_status to vehicle Slomic Jag failed. StartTimeout

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

No branches or pull requests

1 participant