1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Generate nest images thumbnails from events (#44638)

* Capture nest still images from events

Use python google-nest-sdm API for fetching images.  Update home assistant
to use the google-nest-sdm API for fetching the image contents generated
by the server.  This uses the existing websession object for server fetches,
reducing the amount of new code and facilites unit testing using the existing
mechanism.

Simplify tests using the image fetch API rather than a snapshot API
This commit is contained in:
Allen Porter
2021-01-06 07:02:04 -08:00
committed by GitHub
parent d3d66c2e27
commit 560e3811a3
7 changed files with 253 additions and 138 deletions

View File

@@ -933,14 +933,14 @@ async def test_thermostat_set_hvac_fan_only(hass, auth):
assert len(auth.captured_requests) == 2
(method, url, json) = auth.captured_requests.pop(0)
(method, url, json, headers) = auth.captured_requests.pop(0)
assert method == "post"
assert url == "some-device-id:executeCommand"
assert json == {
"command": "sdm.devices.commands.Fan.SetTimer",
"params": {"timerMode": "ON"},
}
(method, url, json) = auth.captured_requests.pop(0)
(method, url, json, headers) = auth.captured_requests.pop(0)
assert method == "post"
assert url == "some-device-id:executeCommand"
assert json == {