mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Rename second Reolink lens from "autotrack" to "telephoto" (#146898)
* Rename second Reolink lens from "autotrack" to "telephoto" * Adjust tests
This commit is contained in:
parent
b4af9a31cb
commit
dd3d6f116e
@ -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,
|
||||
),
|
||||
|
@ -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,
|
||||
),
|
||||
|
@ -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": {
|
||||
|
@ -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}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user