Esphome fix camera image (#52738)

This commit is contained in:
Jesse Hills 2021-07-09 00:44:49 +12:00 committed by GitHub
parent fe1f7ba316
commit 94e15b3eea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -77,7 +77,7 @@ class EsphomeCamera(Camera, EsphomeBaseEntity):
await self._image_cond.wait()
if not self.available:
return None
return self._state.image[:]
return self._state.data[:]
async def _async_camera_stream_image(self) -> bytes | None:
"""Return a single camera image in a stream."""
@ -88,7 +88,7 @@ class EsphomeCamera(Camera, EsphomeBaseEntity):
await self._image_cond.wait()
if not self.available:
return None
return self._state.image[:]
return self._state.data[:]
async def handle_async_mjpeg_stream(self, request):
"""Serve an HTTP MJPEG stream from the camera."""

View File

@ -3,7 +3,7 @@
"name": "ESPHome",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/esphome",
"requirements": ["aioesphomeapi==4.0.1"],
"requirements": ["aioesphomeapi==5.0.0"],
"zeroconf": ["_esphomelib._tcp.local."],
"codeowners": ["@OttoWinter", "@jesserockz"],
"after_dependencies": ["zeroconf", "tag"],

View File

@ -160,7 +160,7 @@ aioeafm==0.1.2
aioemonitor==1.0.5
# homeassistant.components.esphome
aioesphomeapi==4.0.1
aioesphomeapi==5.0.0
# homeassistant.components.flo
aioflo==0.4.1

View File

@ -100,7 +100,7 @@ aioeafm==0.1.2
aioemonitor==1.0.5
# homeassistant.components.esphome
aioesphomeapi==4.0.1
aioesphomeapi==5.0.0
# homeassistant.components.flo
aioflo==0.4.1