Remove unnecessary explicit use of OrderedDict in nest media source (#61054)

Address follow up PR comments from #60073
pull/61057/head
Allen Porter 2021-12-05 09:11:44 -08:00 committed by GitHub
parent dd4ede09c8
commit 1a842d65ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -18,7 +18,6 @@ https://developers.google.com/nest/device-access/api/camera#handle_camera_events
from __future__ import annotations
from collections import OrderedDict
from collections.abc import Mapping
from dataclasses import dataclass
import logging
@ -204,7 +203,7 @@ class NestMediaSource(MediaSource):
async def _get_events(device: Device) -> Mapping[str, ImageEventBase]:
"""Return relevant events for the specified device."""
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: