homeassistant/components/nest/camera_sdm.py
async def async_camera_image(
        self, width: int | None = None, height: int | None = None
    ) -> bytes | None:
        """Return bytes of camera image."""
        # Use the thumbnail from RTSP stream, or a placeholder if stream is
        # not supported (e.g. WebRTC)
        stream = await self.async_create_stream()
        if stream:
            return await stream.async_get_image(width, height)
        return await self.hass.async_add_executor_job(self.placeholder_image)
Return bytes of camera image.
Return bytes of camera image.
Return bytes of camera image .
async def async_camera_image(
        self, width: int | None = None, height: int | None = None
    ) -> bytes | None:
        stream = await self.async_create_stream()
        if stream:
            return await stream.async_get_image(width, height)
        return await self.hass.async_add_executor_job(self.placeholder_image)
async def async_camera_image ( self , width : int | None = None , height : int | None = None ) -> bytes | None : stream = await self . async_create_stream ( ) if stream : return await stream . async_get_image ( width , height ) return await self . hass . async_add_executor_job ( self . placeholder_image )
Return bytes of camera image.
Return bytes of camera image .
"""Return bytes of camera image.""" # Use the thumbnail from RTSP stream, or a placeholder if stream is # not supported (e.g. WebRTC)
self
width
int | None
height
int | None