From d121f4724c0d964ed140c83615f02efc590ac838 Mon Sep 17 00:00:00 2001 From: Alex X Date: Sun, 7 Apr 2024 16:50:15 +0300 Subject: [PATCH] Add translations to services --- custom_components/webrtc/services.yaml | 44 ++++---------- custom_components/webrtc/translations/en.json | 58 +++++++++++++++++++ 2 files changed, 68 insertions(+), 34 deletions(-) diff --git a/custom_components/webrtc/services.yaml b/custom_components/webrtc/services.yaml index d4b4114..f952c67 100644 --- a/custom_components/webrtc/services.yaml +++ b/custom_components/webrtc/services.yaml @@ -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:12345678@192.168.1.123: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: @@ -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:12345678@192.168.1.123: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: diff --git a/custom_components/webrtc/translations/en.json b/custom_components/webrtc/translations/en.json index 33d3370..080ec1a 100644 --- a/custom_components/webrtc/translations/en.json +++ b/custom_components/webrtc/translations/en.json @@ -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" + } + } + } } } \ No newline at end of file