Skip to content

Commit

Permalink
Add translations to services
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 7, 2024
1 parent 89899e6 commit d121f47
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 34 deletions.
44 changes: 10 additions & 34 deletions custom_components/webrtc/services.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,27 @@
create_link:
name: Create Link
description: Create a temporary or permanent link to a stream (enter "url" or "entity")
fields:
link_id:
name: Link ID
description: Create a random or permanent ID for your link
example: fd0a53ca-e9ab-4e7a-86a2-441642b16ae1
required: true
selector:
text:

url:
name: URL
description: Link to RTSP-stream
example: rtsp://rtsp:[email protected]:554/av_stream/ch0
selector:
text:

entity:
name: Entity ID
description: Camera entity
example: camera.generic_stream
selector:
entity:
domain: camera

open_limit:
name: Open limit
description: How many times a link can be opened (0 - unlimit)
example: 1
default: 1
selector:
number:
min: 0
max: 100
unit_of_measurement: times

time_to_live:
name: Time to live
description: How many seconds will the link live (0 - unlimit)
example: 60
default: 60
selector:
number:
Expand All @@ -48,36 +30,30 @@ create_link:
unit_of_measurement: seconds

dash_cast:
name: DashCast
description: Cast stream to Chromecast device via DashCast application
fields:
entity_id:
name: Entity ID
description: Media player entity
example: media_player.mibox4
required: true
selector:
entity:
integration: cast
domain: media_player

url:
name: URL
description: Link to RTSP-stream
example: rtsp://rtsp:[email protected]:554/av_stream/ch0
selector:
text:

force:
name: Force
description: Force restart DashCast application
selector:
boolean:

entity:
name: Entity ID
description: Camera entity
example: camera.generic_stream
selector:
entity:
domain: camera
extra:
selector:
object:
force:
selector:
boolean:
hass_url:
example: http://192.168.1.123:8123
selector:
text:
58 changes: 58 additions & 0 deletions custom_components/webrtc/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,63 @@
}
}
}
},
"services": {
"create_link": {
"name": "Create Link",
"description": "Create a temporary or permanent link to a stream (enter `url` or `entity`)",
"fields": {
"link_id": {
"name": "Link ID",
"description": "Create a random or permanent ID for your link"
},
"url": {
"name": "URL",
"description": "Link to RTSP-stream"
},
"entity": {
"name": "Entity",
"description": "Camera entity_id"
},
"open_limit": {
"name": "Open limit",
"description": "How many times a link can be opened (0 - unlimit)"
},
"time_to_live": {
"name": "Time to live",
"description": "How many seconds will the link live (0 - unlimit)"
}
}
},
"dash_cast": {
"name": "DashCast",
"description": "Cast stream to Chromecast device via DashCast application",
"fields": {
"entity_id": {
"name": "Media Entity",
"description": "Media player entity_id"
},
"url": {
"name": "URL",
"description": "Link to RTSP-stream"
},
"entity": {
"name": "Entity",
"description": "Camera entity_id"
},
"extra": {
"name": "Extra",
"description": "Additional card params"
},
"force": {
"name": "Force",
"description": "Force restart DashCast application"
},
"hass_url": {
"name": "Hass URL",
"description": "Manual base URL to Hass server"
}
}
}
}
}

0 comments on commit d121f47

Please sign in to comment.