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
Error service camera snapshot required width and height #86
Comments
The IPC-A26 does not take a picture. Error in log
|
A workaround for this error is to create a separate camera like this. Make sure you replace all the X's.
|
Same problem found after the latest update. It was working well in the previous release
|
Same error here, started from HA version 2021.9.7. TypeError: async_camera_image() missing 2 required positional arguments: 'width' and 'height' |
Sorry for the issues. How are you reproducing this? I'm having trouble trying to repo. Once I have a repo I can fix it rather easy. |
Call service in action of automation:
|
same error for me new set up |
Check out here under breaking changes -> scroll down to -> custom integration: camera's I think this should be changed and it's working again? |
detailed here: |
Would be nice if this can be fixed soon. |
My plan is to work on this over the weekend |
@GeitjeG Thanks for that. Now I can reproduce this. Digging deeper now for a fix. |
This should do it - 83c0930 Try 0.9.24 |
I can confirm the snapshot is working again with 0.9.24. Thanks! |
it's working again. Thanks! |
Great, it's working again! Thanks for your efforts. |
Version of the custom_component
0.9.23
Configuration
Describe the bug
When using service camera snapshot I get the an error.
Debug log
Logger: homeassistant.helpers.script.websocket_api_script
Source: components/camera/init.py:751
First occurred: 12:14:15 (1 occurrences)
Last logged: 12:14:15
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: async_camera_image() missing 2 required positional arguments: 'width' and 'height'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1492, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1527, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 843, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 751, in async_handle_snapshot_service
image = await camera.async_camera_image()
TypeError: async_camera_image() missing 2 required positional arguments: 'width' and 'height'
Logger: homeassistant.components.websocket_api.http.connection
Source: components/camera/init.py:751
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:14:15 (1 occurrences)
Last logged: 12:14:15
[547612669888] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 25, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 525, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1219, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1492, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1527, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 843, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 751, in async_handle_snapshot_service
image = await camera.async_camera_image()
TypeError: async_camera_image() missing 2 required positional arguments: 'width' and 'height'
The text was updated successfully, but these errors were encountered: