mirror of
https://github.com/home-assistant/core.git
synced 2025-11-16 22:40:44 +00:00
Pass width and height when requesting camera snapshot (#53835)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"""Support for Homekit cameras."""
|
||||
from __future__ import annotations
|
||||
|
||||
from aiohomekit.model.services import ServicesTypes
|
||||
|
||||
from homeassistant.components.camera import Camera
|
||||
@@ -21,12 +23,14 @@ class HomeKitCamera(AccessoryEntity, Camera):
|
||||
"""Return the current state of the camera."""
|
||||
return "idle"
|
||||
|
||||
async def async_camera_image(self):
|
||||
async def async_camera_image(
|
||||
self, width: int | None = None, height: int | None = None
|
||||
) -> bytes | None:
|
||||
"""Return a jpeg with the current camera snapshot."""
|
||||
return await self._accessory.pairing.image(
|
||||
self._aid,
|
||||
640,
|
||||
480,
|
||||
width or 640,
|
||||
height or 480,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user