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 @@
"""Support for a camera of a BloomSky weather station."""
from __future__ import annotations
import logging
import requests
@ -37,7 +39,9 @@ class BloomSkyCamera(Camera):
self._logger = logging.getLogger(__name__)
self._attr_unique_id = self._id
def camera_image(self):
def camera_image(
self, width: int | None = None, height: int | None = None
) -> bytes | None:
"""Update the camera's image if it has changed."""
try:
self._url = self._bloomsky.devices[self._id]["Data"]["ImageURL"]