mirror of
https://github.com/home-assistant/core.git
synced 2025-06-27 16:37:08 +00:00
Remove unnecessary explicit use of OrderedDict in nest media source (#61054)
Address follow up PR comments from #60073
This commit is contained in:
parent
dd4ede09c8
commit
1a842d65ce
@ -18,7 +18,6 @@ https://developers.google.com/nest/device-access/api/camera#handle_camera_events
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from collections import OrderedDict
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
import logging
|
import logging
|
||||||
@ -204,7 +203,7 @@ class NestMediaSource(MediaSource):
|
|||||||
async def _get_events(device: Device) -> Mapping[str, ImageEventBase]:
|
async def _get_events(device: Device) -> Mapping[str, ImageEventBase]:
|
||||||
"""Return relevant events for the specified device."""
|
"""Return relevant events for the specified device."""
|
||||||
events = await device.event_media_manager.async_events()
|
events = await device.event_media_manager.async_events()
|
||||||
return OrderedDict({e.event_id: e for e in events})
|
return {e.event_id: e for e in events}
|
||||||
|
|
||||||
|
|
||||||
def _browse_root() -> BrowseMediaSource:
|
def _browse_root() -> BrowseMediaSource:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user