Pass width and height when requesting camera snapshot (#53835)

This commit is contained in:
J. Nick Koston 2021-08-10 19:33:06 -05:00 committed by GitHub
parent 390023a576
commit e99576c094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 418 additions and 113 deletions

View file

@ -1,4 +1,6 @@
"""Camera that loads a picture from an MQTT topic."""
from __future__ import annotations
import functools
import voluptuous as vol
@ -98,6 +100,8 @@ class MqttCamera(MqttEntity, Camera):
},
)
async def async_camera_image(self):
async def async_camera_image(
self, width: int | None = None, height: int | None = None
) -> bytes | None:
"""Return image response."""
return self._last_image