Remove legacy compatibility for camera platforms that do not support width/height arguments #68039
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking change
This removes the compatibility layer that was added in #53835
The function signature for
async_camera_image
andcamera_image
has changed to include a width and height.The goal of the change is to reduce the overhead of sending large images that will only be displayed as small images as this can quickly consume hundred of megabytes of bandwidth / mobile data allocation.
Scaling should be done on a best effort basis and is not a strict requirement as the existing behavior of falling back to scaling at the display layer is preserved.
Integrations should pass on the width and height if the underlying
camera is capable of scaling the image.
Integrations may choose to ignore the height parameter in order to
preserve aspect ratio
If the integration cannot scale the image and returns a jpeg image, it will automatically be
scaled by the camera integration when requested.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: