Use UID instead of MAC or channel for unique_ID in Reolink (#119744)
This commit is contained in:
parent
d6be733287
commit
8b4a5042bb
8 changed files with 213 additions and 28 deletions
|
@ -164,10 +164,14 @@ class ReolinkVODMediaSource(MediaSource):
|
|||
continue
|
||||
|
||||
device = device_reg.async_get(entity.device_id)
|
||||
ch = entity.unique_id.split("_")[1]
|
||||
if ch in channels or device is None:
|
||||
ch_id = entity.unique_id.split("_")[1]
|
||||
if ch_id in channels or device is None:
|
||||
continue
|
||||
channels.append(ch)
|
||||
channels.append(ch_id)
|
||||
|
||||
ch: int | str = ch_id
|
||||
if len(ch_id) > 3:
|
||||
ch = host.api.channel_for_uid(ch_id)
|
||||
|
||||
if (
|
||||
host.api.api_version("recReplay", int(ch)) < 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue