From 7cd4f787678b76bd0bc6c360321ed45a655dd2b5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 3 Oct 2024 08:08:17 -0500 Subject: [PATCH] Make go2rtc supported streams a frozenset (#127439) Avoids the linear search of the tuple --- homeassistant/components/go2rtc/__init__.py | 54 +++++++++++---------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/homeassistant/components/go2rtc/__init__.py b/homeassistant/components/go2rtc/__init__.py index 4ff7ee73efc..4ca1d72008f 100644 --- a/homeassistant/components/go2rtc/__init__.py +++ b/homeassistant/components/go2rtc/__init__.py @@ -15,32 +15,34 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession from .const import CONF_BINARY from .server import Server -_SUPPORTED_STREAMS = ( - "bubble", - "dvrip", - "expr", - "ffmpeg", - "gopro", - "homekit", - "http", - "https", - "httpx", - "isapi", - "ivideon", - "kasa", - "nest", - "onvif", - "roborock", - "rtmp", - "rtmps", - "rtmpx", - "rtsp", - "rtsps", - "rtspx", - "tapo", - "tcp", - "webrtc", - "webtorrent", +_SUPPORTED_STREAMS = frozenset( + ( + "bubble", + "dvrip", + "expr", + "ffmpeg", + "gopro", + "homekit", + "http", + "https", + "httpx", + "isapi", + "ivideon", + "kasa", + "nest", + "onvif", + "roborock", + "rtmp", + "rtmps", + "rtmpx", + "rtsp", + "rtsps", + "rtspx", + "tapo", + "tcp", + "webrtc", + "webtorrent", + ) )