Refactor code structure for improved readability and maintainability

This commit is contained in:
CeeWeasel
2026-01-19 14:47:59 -05:00
parent 6550521520
commit 97a0e678c0
84 changed files with 1614 additions and 1177 deletions
+9 -9
View File
@@ -1,9 +1,9 @@
alias: Cam03 on Computer Area Hub
sequence:
- action: webrtc.dash_cast
data:
entity_id: media_player.computer_area_hub
url: rtsp_cam03
force: true
extra:
mode: webrtc
# alias: Cam03 on Computer Area Hub
# sequence:
# - action: webrtc.dash_cast
# data:
# entity_id: media_player.computer_area_hub
# url: rtsp_cam03
# force: true
# extra:
# mode: webrtc
+9 -9
View File
@@ -1,9 +1,9 @@
alias: Cam03_sub on Computer Area Hub
sequence:
- action: webrtc.dash_cast
data:
entity_id: media_player.computer_area_hub
url: cam03_sub
force: true
extra:
mode: webrtc
# alias: Cam03_sub on Computer Area Hub
# sequence:
# - action: webrtc.dash_cast
# data:
# entity_id: media_player.computer_area_hub
# url: cam03_sub
# force: true
# extra:
# mode: webrtc
+8 -8
View File
@@ -1,8 +1,8 @@
alias: Cam08 on Computer Area Hub
sequence:
- action: webrtc.dash_cast
data:
entity_id: media_player.computer_area_hub
url: cam08_sub
extra:
mode: webrtc
# alias: Cam08 on Computer Area Hub
# sequence:
# - action: webrtc.dash_cast
# data:
# entity_id: media_player.computer_area_hub
# url: cam08_sub
# extra:
# mode: webrtc
+9 -9
View File
@@ -1,9 +1,9 @@
alias: Cam08 on Front Room Hub
sequence:
- action: webrtc.dash_cast
data:
entity_id: media_player.front_room_hub
url: cam08_sub
force: true
extra:
mode: webrtc
# alias: Cam08 on Front Room Hub
# sequence:
# - action: webrtc.dash_cast
# data:
# entity_id: media_player.front_room_hub
# url: cam08_sub
# force: true
# extra:
# mode: webrtc
+9 -9
View File
@@ -1,9 +1,9 @@
alias: Cam13 on Computer Area Hub
sequence:
- action: webrtc.dash_cast
data:
entity_id: media_player.computer_area_hub
url: cam13_sub
force: true
extra:
mode: webrtc
# alias: Cam13 on Computer Area Hub
# sequence:
# - action: webrtc.dash_cast
# data:
# entity_id: media_player.computer_area_hub
# url: cam13_sub
# force: true
# extra:
# mode: webrtc
+9 -9
View File
@@ -1,9 +1,9 @@
alias: Cam13 on Front Room Hub
sequence:
- action: webrtc.dash_cast
data:
entity_id: media_player.front_room_hub
url: cam13_sub
force: true
extra:
mode: webrtc
# alias: Cam13 on Front Room Hub
# sequence:
# - action: webrtc.dash_cast
# data:
# entity_id: media_player.front_room_hub
# url: cam13_sub
# force: true
# extra:
# mode: webrtc
+9 -9
View File
@@ -1,9 +1,9 @@
alias: Cam19 on Computer Area Hub
sequence:
- action: webrtc.dash_cast
data:
entity_id: media_player.computer_area_hub
url: rtsp://192.168.1.7:8554/cam19_sub
force: true
extra:
mode: webrtc
# alias: Cam19 on Computer Area Hub
# sequence:
# - action: webrtc.dash_cast
# data:
# entity_id: media_player.computer_area_hub
# url: rtsp://192.168.1.7:8554/cam19_sub
# force: true
# extra:
# mode: webrtc
+9 -9
View File
@@ -1,9 +1,9 @@
alias: Cam19 on Front Room Hub
sequence:
- action: webrtc.dash_cast
data:
entity_id: media_player.front_room_hub
url: cam19_sub
force: true
extra:
mode: webrtc
# alias: Cam19 on Front Room Hub
# sequence:
# - action: webrtc.dash_cast
# data:
# entity_id: media_player.front_room_hub
# url: cam19_sub
# force: true
# extra:
# mode: webrtc
+15 -15
View File
@@ -1,17 +1,17 @@
alias: Create temporary camera link
sequence:
- variables:
link_id: "{% for _ in range(40) %}{{ range(10)|random }}{% endfor %}"
# alias: Create temporary camera link
# sequence:
# - variables:
# link_id: "{% for _ in range(40) %}{{ range(10)|random }}{% endfor %}"
- action: webrtc.create_link
data:
link_id: "{{ link_id }}" # create a random or permanent link ID
# url: rtsp://rtsp:12345678@192.168.1.123:554/av_stream/ch0
# entity: camera.sonoff # you can use camera entity_id or url
url: rtsp://192.168.1.7:8554/cam03_sub
open_limit: 1 # how many times a link can be opened (0 - unlimit, 1 - default)
time_to_live: 60 # how many seconds will the link live (0 - unlimit, 60 - default)
# - action: webrtc.create_link
# data:
# link_id: "{{ link_id }}" # create a random or permanent link ID
# # url: rtsp://rtsp:12345678@192.168.1.123:554/av_stream/ch0
# # entity: camera.sonoff # you can use camera entity_id or url
# url: rtsp://192.168.1.7:8554/cam03_sub
# open_limit: 1 # how many times a link can be opened (0 - unlimit, 1 - default)
# time_to_live: 60 # how many seconds will the link live (0 - unlimit, 60 - default)
- action: persistent_notification.create
data:
message: '<a href="/webrtc/embed?url={{ link_id }}" target="_blank">Open Camera</a>'
# - action: persistent_notification.create
# data:
# message: '<a href="/webrtc/embed?url={{ link_id }}" target="_blank">Open Camera</a>'