From dd3d6f116ec916acc42c9ff2eec53266d003286d Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Mon, 23 Jun 2025 20:45:24 +0200 Subject: [PATCH] Rename second Reolink lens from "autotrack" to "telephoto" (#146898) * Rename second Reolink lens from "autotrack" to "telephoto" * Adjust tests --- homeassistant/components/reolink/camera.py | 8 ++++---- homeassistant/components/reolink/media_source.py | 8 ++++---- homeassistant/components/reolink/strings.json | 12 ++++++------ tests/components/reolink/test_media_source.py | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/homeassistant/components/reolink/camera.py b/homeassistant/components/reolink/camera.py index 119fb625349..b9744f8e002 100644 --- a/homeassistant/components/reolink/camera.py +++ b/homeassistant/components/reolink/camera.py @@ -69,21 +69,21 @@ CAMERA_ENTITIES = ( ), ReolinkCameraEntityDescription( key="autotrack_sub", - stream="autotrack_sub", - translation_key="autotrack_sub", + stream="telephoto_sub", + translation_key="telephoto_sub", supported=lambda api, ch: api.supported(ch, "autotrack_stream"), ), ReolinkCameraEntityDescription( key="autotrack_snapshots_sub", stream="autotrack_snapshots_sub", - translation_key="autotrack_snapshots_sub", + translation_key="telephoto_snapshots_sub", supported=lambda api, ch: api.supported(ch, "autotrack_stream"), entity_registry_enabled_default=False, ), ReolinkCameraEntityDescription( key="autotrack_snapshots_main", stream="autotrack_snapshots_main", - translation_key="autotrack_snapshots_main", + translation_key="telephoto_snapshots_main", supported=lambda api, ch: api.supported(ch, "autotrack_stream"), entity_registry_enabled_default=False, ), diff --git a/homeassistant/components/reolink/media_source.py b/homeassistant/components/reolink/media_source.py index 36a2f3c5489..9c8c685d898 100644 --- a/homeassistant/components/reolink/media_source.py +++ b/homeassistant/components/reolink/media_source.py @@ -42,9 +42,9 @@ def res_name(stream: str) -> str: case "main": return "High res." case "autotrack_sub": - return "Autotrack low res." + return "Telephoto low res." case "autotrack_main": - return "Autotrack high res." + return "Telephoto high res." case _: return "Low res." @@ -284,7 +284,7 @@ class ReolinkVODMediaSource(MediaSource): identifier=f"RES|{config_entry_id}|{channel}|autotrack_sub", media_class=MediaClass.CHANNEL, media_content_type=MediaType.PLAYLIST, - title="Autotrack low resolution", + title="Telephoto low resolution", can_play=False, can_expand=True, ), @@ -293,7 +293,7 @@ class ReolinkVODMediaSource(MediaSource): identifier=f"RES|{config_entry_id}|{channel}|autotrack_main", media_class=MediaClass.CHANNEL, media_content_type=MediaType.PLAYLIST, - title="Autotrack high resolution", + title="Telephoto high resolution", can_play=False, can_expand=True, ), diff --git a/homeassistant/components/reolink/strings.json b/homeassistant/components/reolink/strings.json index e7a970ec1c8..7a77c523b16 100644 --- a/homeassistant/components/reolink/strings.json +++ b/homeassistant/components/reolink/strings.json @@ -504,14 +504,14 @@ "ext_lens_1": { "name": "Balanced lens 1" }, - "autotrack_sub": { - "name": "Autotrack fluent" + "telephoto_sub": { + "name": "Telephoto fluent" }, - "autotrack_snapshots_sub": { - "name": "Autotrack snapshots fluent" + "telephoto_snapshots_sub": { + "name": "Telephoto snapshots fluent" }, - "autotrack_snapshots_main": { - "name": "Autotrack snapshots clear" + "telephoto_snapshots_main": { + "name": "Telephoto snapshots clear" } }, "light": { diff --git a/tests/components/reolink/test_media_source.py b/tests/components/reolink/test_media_source.py index 59f0c6c195d..67ae78e5fa4 100644 --- a/tests/components/reolink/test_media_source.py +++ b/tests/components/reolink/test_media_source.py @@ -194,13 +194,13 @@ async def test_browsing( hass, f"{URI_SCHEME}{DOMAIN}/{browse_res_AT_sub_id}" ) assert browse.domain == DOMAIN - assert browse.title == f"{TEST_NVR_NAME} lens 0 Autotrack low res." + assert browse.title == f"{TEST_NVR_NAME} lens 0 Telephoto low res." browse = await async_browse_media( hass, f"{URI_SCHEME}{DOMAIN}/{browse_res_AT_main_id}" ) assert browse.domain == DOMAIN - assert browse.title == f"{TEST_NVR_NAME} lens 0 Autotrack high res." + assert browse.title == f"{TEST_NVR_NAME} lens 0 Telephoto high res." browse = await async_browse_media( hass, f"{URI_SCHEME}{DOMAIN}/{browse_res_main_id}"