mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Fix netatmo media browser of outdoor events (#40079)
* Fix outdoor events * Fix test data * Increase coverage
This commit is contained in:
@@ -18,6 +18,7 @@ async def test_async_browse_media(hass):
|
||||
"12:34:56:78:90:ab": {
|
||||
1599152672: {
|
||||
"id": "12345",
|
||||
"type": "person",
|
||||
"time": 1599152672,
|
||||
"camera_id": "12:34:56:78:90:ab",
|
||||
"snapshot": {
|
||||
@@ -30,6 +31,7 @@ async def test_async_browse_media(hass):
|
||||
},
|
||||
1599152673: {
|
||||
"id": "12346",
|
||||
"type": "person",
|
||||
"time": 1599152673,
|
||||
"camera_id": "12:34:56:78:90:ab",
|
||||
"snapshot": {
|
||||
@@ -37,9 +39,47 @@ async def test_async_browse_media(hass):
|
||||
},
|
||||
"message": "<b>Tobias</b> seen",
|
||||
},
|
||||
1599152674: {
|
||||
"id": "12347",
|
||||
"type": "outdoor",
|
||||
"time": 1599152674,
|
||||
"camera_id": "12:34:56:78:90:ac",
|
||||
"snapshot": {
|
||||
"url": "https://netatmocameraimage",
|
||||
},
|
||||
"video_id": "98766",
|
||||
"video_status": "available",
|
||||
"event_list": [
|
||||
{
|
||||
"type": "vehicle",
|
||||
"time": 1599152674,
|
||||
"id": "12347-0",
|
||||
"offset": 0,
|
||||
"message": "Vehicle detected",
|
||||
"snapshot": {
|
||||
"url": "https://netatmocameraimage",
|
||||
},
|
||||
},
|
||||
{
|
||||
"type": "human",
|
||||
"time": 1599152674,
|
||||
"id": "12347-1",
|
||||
"offset": 8,
|
||||
"message": "Person detected",
|
||||
"snapshot": {
|
||||
"url": "https://netatmocameraimage",
|
||||
},
|
||||
},
|
||||
],
|
||||
"media_url": "http:///files/high/index.m3u8",
|
||||
},
|
||||
}
|
||||
}
|
||||
hass.data[DOMAIN][DATA_CAMERAS] = {"12:34:56:78:90:ab": "MyCamera"}
|
||||
|
||||
hass.data[DOMAIN][DATA_CAMERAS] = {
|
||||
"12:34:56:78:90:ab": "MyCamera",
|
||||
"12:34:56:78:90:ac": "MyOutdoorCamera",
|
||||
}
|
||||
|
||||
assert await async_setup_component(hass, const.DOMAIN, {})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
Reference in New Issue
Block a user