From 6c40004061039ee5bc8a9e88c78aede0bd9e7988 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 12 Jul 2023 16:38:47 +0200 Subject: [PATCH] Migrate integration services (I-K) to support translations (#96373) * Migrate integration services (I-K) to support translations * Apply suggestions from code review Co-authored-by: Joost Lekkerkerker * Update homeassistant/components/kodi/strings.json Co-authored-by: Joost Lekkerkerker --------- Co-authored-by: Joost Lekkerkerker --- homeassistant/components/icloud/services.yaml | 30 ----- homeassistant/components/icloud/strings.json | 70 ++++++++++ homeassistant/components/ifttt/services.yaml | 15 --- homeassistant/components/ifttt/strings.json | 38 ++++++ homeassistant/components/ihc/services.yaml | 38 ------ homeassistant/components/ihc/strings.json | 72 +++++++++++ .../components/insteon/services.yaml | 46 ------- homeassistant/components/insteon/strings.json | 114 +++++++++++++++++ homeassistant/components/iperf3/services.yaml | 4 - homeassistant/components/iperf3/strings.json | 14 ++ homeassistant/components/isy994/services.yaml | 63 --------- homeassistant/components/isy994/strings.json | 120 +++++++++++++++++- homeassistant/components/izone/services.yaml | 8 -- homeassistant/components/izone/strings.json | 22 ++++ homeassistant/components/keba/services.yaml | 44 ------- homeassistant/components/keba/strings.json | 62 +++++++++ homeassistant/components/kef/services.yaml | 40 ------ homeassistant/components/kef/strings.json | 98 ++++++++++++++ .../components/keyboard/services.yaml | 29 ----- .../components/keyboard/strings.json | 28 ++++ .../components/keymitt_ble/services.yaml | 10 -- .../components/keymitt_ble/strings.json | 24 ++++ homeassistant/components/knx/services.yaml | 38 ------ homeassistant/components/knx/strings.json | 86 +++++++++++++ homeassistant/components/kodi/services.yaml | 14 -- homeassistant/components/kodi/strings.json | 34 +++++ 26 files changed, 781 insertions(+), 380 deletions(-) create mode 100644 homeassistant/components/ihc/strings.json create mode 100644 homeassistant/components/iperf3/strings.json create mode 100644 homeassistant/components/keba/strings.json create mode 100644 homeassistant/components/kef/strings.json create mode 100644 homeassistant/components/keyboard/strings.json diff --git a/homeassistant/components/icloud/services.yaml b/homeassistant/components/icloud/services.yaml index ddeae448f8a..5ffbc2a49ae 100644 --- a/homeassistant/components/icloud/services.yaml +++ b/homeassistant/components/icloud/services.yaml @@ -1,93 +1,63 @@ update: - name: Update - description: Update iCloud devices. fields: account: - name: Account - description: Your iCloud account username (email) or account name. required: true example: "steve@apple.com" selector: text: play_sound: - name: Play sound - description: Play sound on an Apple device. fields: account: - name: Account - description: Your iCloud account username (email) or account name. required: true example: "steve@apple.com" selector: text: device_name: - name: Device Name - description: The name of the Apple device to play a sound. required: true example: "stevesiphone" selector: text: display_message: - name: Display message - description: Display a message on an Apple device. fields: account: - name: Account - description: Your iCloud account username (email) or account name. required: true example: "steve@apple.com" selector: text: device_name: - name: Device Name - description: The name of the Apple device to display the message. required: true example: "stevesiphone" selector: text: message: - name: Message - description: The content of your message. required: true example: "Hey Steve !" selector: text: sound: - name: Sound - description: To make a sound when displaying the message. selector: boolean: lost_device: - name: Lost device - description: Make an Apple device in lost state. fields: account: - name: Account - description: Your iCloud account username (email) or account name. required: true example: "steve@apple.com" selector: text: device_name: - name: Device Name - description: The name of the Apple device to set lost. required: true example: "stevesiphone" selector: text: number: - name: Number - description: The phone number to call in lost mode (must contain country code). required: true example: "+33450020100" selector: text: message: - name: Message - description: The message to display in lost mode. required: true example: "Call me" selector: diff --git a/homeassistant/components/icloud/strings.json b/homeassistant/components/icloud/strings.json index 385dc74a0ab..9bc7750790f 100644 --- a/homeassistant/components/icloud/strings.json +++ b/homeassistant/components/icloud/strings.json @@ -42,5 +42,75 @@ "no_device": "None of your devices have \"Find my iPhone\" activated", "reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]" } + }, + "services": { + "update": { + "name": "Update", + "description": "Updates iCloud devices.", + "fields": { + "account": { + "name": "Account", + "description": "Your iCloud account username (email) or account name." + } + } + }, + "play_sound": { + "name": "Play sound", + "description": "Plays sound on an Apple device.", + "fields": { + "account": { + "name": "Account", + "description": "Your iCloud account username (email) or account name." + }, + "device_name": { + "name": "Device name", + "description": "The name of the Apple device to play a sound." + } + } + }, + "display_message": { + "name": "Display message", + "description": "Displays a message on an Apple device.", + "fields": { + "account": { + "name": "Account", + "description": "Your iCloud account username (email) or account name." + }, + "device_name": { + "name": "Device name", + "description": "The name of the Apple device to display the message." + }, + "message": { + "name": "Message", + "description": "The content of your message." + }, + "sound": { + "name": "Sound", + "description": "To make a sound when displaying the message." + } + } + }, + "lost_device": { + "name": "Lost device", + "description": "Makes an Apple device in lost state.", + "fields": { + "account": { + "name": "Account", + "description": "Your iCloud account username (email) or account name." + }, + "device_name": { + "name": "Device name", + "description": "The name of the Apple device to set lost." + }, + "number": { + "name": "Number", + "description": "The phone number to call in lost mode (must contain country code)." + }, + "message": { + "name": "Message", + "description": "The message to display in lost mode." + } + } + } } } diff --git a/homeassistant/components/ifttt/services.yaml b/homeassistant/components/ifttt/services.yaml index 9c02284d4f8..550aecad56b 100644 --- a/homeassistant/components/ifttt/services.yaml +++ b/homeassistant/components/ifttt/services.yaml @@ -1,49 +1,34 @@ # Describes the format for available ifttt services push_alarm_state: - name: Push alarm state - description: Update the alarm state to the specified value. fields: entity_id: - description: Name of the alarm control panel which state has to be updated. required: true selector: entity: domain: alarm_control_panel state: - name: State - description: The state to which the alarm control panel has to be set. required: true example: "armed_night" selector: text: trigger: - name: Trigger - description: Triggers the configured IFTTT Webhook. fields: event: - name: Event - description: The name of the event to send. required: true example: "MY_HA_EVENT" selector: text: value1: - name: Value 1 - description: Generic field to send data via the event. example: "Hello World" selector: text: value2: - name: Value 2 - description: Generic field to send data via the event. example: "some additional data" selector: text: value3: - name: Value 3 - description: Generic field to send data via the event. example: "even more data" selector: text: diff --git a/homeassistant/components/ifttt/strings.json b/homeassistant/components/ifttt/strings.json index 179d62b463c..e52a0882eb1 100644 --- a/homeassistant/components/ifttt/strings.json +++ b/homeassistant/components/ifttt/strings.json @@ -14,5 +14,43 @@ "create_entry": { "default": "To send events to Home Assistant, you will need to use the \"Make a web request\" action from the [IFTTT Webhook applet]({applet_url}).\n\nFill in the following info:\n\n- URL: `{webhook_url}`\n- Method: POST\n- Content Type: application/json\n\nSee [the documentation]({docs_url}) on how to configure automations to handle incoming data." } + }, + "services": { + "push_alarm_state": { + "name": "Push alarm state", + "description": "Updates the alarm state to the specified value.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the alarm control panel which state has to be updated." + }, + "state": { + "name": "State", + "description": "The state to which the alarm control panel has to be set." + } + } + }, + "trigger": { + "name": "Trigger", + "description": "Triggers the configured IFTTT Webhook.", + "fields": { + "event": { + "name": "Event", + "description": "The name of the event to send." + }, + "value1": { + "name": "Value 1", + "description": "Generic field to send data via the event." + }, + "value2": { + "name": "Value 2", + "description": "Generic field to send data via the event." + }, + "value3": { + "name": "Value 3", + "description": "Generic field to send data via the event." + } + } + } } } diff --git a/homeassistant/components/ihc/services.yaml b/homeassistant/components/ihc/services.yaml index 33f6c8ca31d..1e1727abea8 100644 --- a/homeassistant/components/ihc/services.yaml +++ b/homeassistant/components/ihc/services.yaml @@ -1,22 +1,14 @@ # Describes the format for available IHC services set_runtime_value_bool: - name: Set runtime value boolean - description: Set a boolean runtime value on the IHC controller. fields: controller_id: - name: Controller ID - description: | - If you have multiple controller, this is the index of you controller - starting with 0. default: 0 selector: number: min: 0 max: 100 ihc_id: - name: IHC ID - description: The integer IHC resource ID. required: true selector: number: @@ -24,29 +16,19 @@ set_runtime_value_bool: max: 1000000 mode: box value: - name: Value - description: The boolean value to set. required: true selector: boolean: set_runtime_value_int: - name: Set runtime value integer - description: Set an integer runtime value on the IHC controller. fields: controller_id: - name: Controller ID - description: | - If you have multiple controller, this is the index of you controller - starting with 0. default: 0 selector: number: min: 0 max: 100 ihc_id: - name: IHC ID - description: The integer IHC resource ID. required: true selector: number: @@ -54,8 +36,6 @@ set_runtime_value_int: max: 1000000 mode: box value: - name: Value - description: The integer value to set. required: true selector: number: @@ -64,22 +44,14 @@ set_runtime_value_int: mode: box set_runtime_value_float: - name: Set runtime value float - description: Set a float runtime value on the IHC controller. fields: controller_id: - name: Controller ID - description: | - If you have multiple controller, this is the index of you controller - starting with 0. default: 0 selector: number: min: 0 max: 100 ihc_id: - name: IHC ID - description: The integer IHC resource ID. required: true selector: number: @@ -87,8 +59,6 @@ set_runtime_value_float: max: 1000000 mode: box value: - name: Value - description: The float value to set. required: true selector: number: @@ -98,22 +68,14 @@ set_runtime_value_float: mode: box pulse: - name: Pulse - description: Pulses an input on the IHC controller. fields: controller_id: - name: Controller ID - description: | - If you have multiple controller, this is the index of you controller - starting with 0. default: 0 selector: number: min: 0 max: 100 ihc_id: - name: IHC ID - description: The integer IHC resource ID. required: true selector: number: diff --git a/homeassistant/components/ihc/strings.json b/homeassistant/components/ihc/strings.json new file mode 100644 index 00000000000..3ee45a4f464 --- /dev/null +++ b/homeassistant/components/ihc/strings.json @@ -0,0 +1,72 @@ +{ + "services": { + "set_runtime_value_bool": { + "name": "Set runtime value boolean", + "description": "Sets a boolean runtime value on the IHC controller.", + "fields": { + "controller_id": { + "name": "Controller ID", + "description": "If you have multiple controller, this is the index of you controller\nstarting with 0.\n." + }, + "ihc_id": { + "name": "IHC ID", + "description": "The integer IHC resource ID." + }, + "value": { + "name": "Value", + "description": "The boolean value to set." + } + } + }, + "set_runtime_value_int": { + "name": "Set runtime value integer", + "description": "Sets an integer runtime value on the IHC controller.", + "fields": { + "controller_id": { + "name": "Controller ID", + "description": "If you have multiple controller, this is the index of you controller\nstarting with 0.\n." + }, + "ihc_id": { + "name": "IHC ID", + "description": "The integer IHC resource ID." + }, + "value": { + "name": "Value", + "description": "The integer value to set." + } + } + }, + "set_runtime_value_float": { + "name": "Set runtime value float", + "description": "Sets a float runtime value on the IHC controller.", + "fields": { + "controller_id": { + "name": "Controller ID", + "description": "If you have multiple controller, this is the index of you controller\nstarting with 0.\n." + }, + "ihc_id": { + "name": "IHC ID", + "description": "The integer IHC resource ID." + }, + "value": { + "name": "Value", + "description": "The float value to set." + } + } + }, + "pulse": { + "name": "Pulse", + "description": "Pulses an input on the IHC controller.", + "fields": { + "controller_id": { + "name": "Controller ID", + "description": "If you have multiple controller, this is the index of you controller\nstarting with 0.\n." + }, + "ihc_id": { + "name": "IHC ID", + "description": "The integer IHC resource ID." + } + } + } + } +} diff --git a/homeassistant/components/insteon/services.yaml b/homeassistant/components/insteon/services.yaml index 164c917c793..a58dfb4b8ce 100644 --- a/homeassistant/components/insteon/services.yaml +++ b/homeassistant/components/insteon/services.yaml @@ -1,18 +1,12 @@ add_all_link: - name: Add all link - description: Tells the Insteom Modem (IM) start All-Linking mode. Once the IM is in All-Linking mode, press the link button on the device to complete All-Linking. fields: group: - name: Group - description: All-Link group number. required: true selector: number: min: 0 max: 255 mode: - name: Mode - description: Linking mode controller - IM is controller responder - IM is responder required: true selector: select: @@ -20,55 +14,35 @@ add_all_link: - "controller" - "responder" delete_all_link: - name: Delete all link - description: Tells the Insteon Modem (IM) to remove an All-Link record from the All-Link Database of the IM and a device. Once the IM is set to delete the link, press the link button on the corresponding device to complete the process. fields: group: - name: Group - description: All-Link group number. required: true selector: number: min: 0 max: 255 load_all_link_database: - name: Load all link database - description: Load the All-Link Database for a device. WARNING - Loading a device All-LInk database is very time consuming and inconsistent. This may take a LONG time and may need to be repeated to obtain all records. fields: entity_id: - name: Entity - description: Name of the device to load. Use "all" to load the database of all devices. required: true example: "light.1a2b3c" selector: text: reload: - name: Reload - description: Reload all records. If true the current records are cleared from memory (does not effect the device) and the records are reloaded. If false the existing records are left in place and only missing records are added. Default is false. default: false selector: boolean: print_all_link_database: - name: Print all link database - description: Print the All-Link Database for a device. Requires that the All-Link Database is loaded into memory. fields: entity_id: - name: Entity - description: Name of the device to print required: true selector: entity: integration: insteon print_im_all_link_database: - name: Print IM all link database - description: Print the All-Link Database for the INSTEON Modem (IM). x10_all_units_off: - name: X10 all units off - description: Send X10 All Units Off command fields: housecode: - name: Housecode - description: X10 house code required: true selector: select: @@ -90,12 +64,8 @@ x10_all_units_off: - "o" - "p" x10_all_lights_on: - name: X10 all lights on - description: Send X10 All Lights On command fields: housecode: - name: Housecode - description: X10 house code required: true selector: select: @@ -117,12 +87,8 @@ x10_all_lights_on: - "o" - "p" x10_all_lights_off: - name: X10 all lights off - description: Send X10 All Lights Off command fields: housecode: - name: Housecode - description: X10 house code required: true selector: select: @@ -144,36 +110,24 @@ x10_all_lights_off: - "o" - "p" scene_on: - name: Scene on - description: Trigger an INSTEON scene to turn ON. fields: group: - name: Group - description: INSTEON group or scene number required: true selector: number: min: 0 max: 255 scene_off: - name: Scene off - description: Trigger an INSTEON scene to turn OFF. fields: group: - name: Group - description: INSTEON group or scene number required: true selector: number: min: 0 max: 255 add_default_links: - name: Add default links - description: Add the default links between the device and the Insteon Modem (IM) fields: entity_id: - name: Entity - description: Name of the device to load. Use "all" to load the database of all devices. required: true example: "light.1a2b3c" selector: diff --git a/homeassistant/components/insteon/strings.json b/homeassistant/components/insteon/strings.json index a93ba4a7476..3f3e3df78c7 100644 --- a/homeassistant/components/insteon/strings.json +++ b/homeassistant/components/insteon/strings.json @@ -109,5 +109,119 @@ "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", "input_error": "Invalid entries, please check your values." } + }, + "services": { + "add_all_link": { + "name": "Add all link", + "description": "Tells the Insteom Modem (IM) start All-Linking mode. Once the IM is in All-Linking mode, press the link button on the device to complete All-Linking.", + "fields": { + "group": { + "name": "Group", + "description": "All-Link group number." + }, + "mode": { + "name": "Mode", + "description": "Linking mode controller - IM is controller responder - IM is responder." + } + } + }, + "delete_all_link": { + "name": "Delete all link", + "description": "Tells the Insteon Modem (IM) to remove an All-Link record from the All-Link Database of the IM and a device. Once the IM is set to delete the link, press the link button on the corresponding device to complete the process.", + "fields": { + "group": { + "name": "Group", + "description": "All-Link group number." + } + } + }, + "load_all_link_database": { + "name": "Load all link database", + "description": "Load the All-Link Database for a device. WARNING - Loading a device All-LInk database is very time consuming and inconsistent. This may take a LONG time and may need to be repeated to obtain all records.", + "fields": { + "entity_id": { + "name": "Entity", + "description": "Name of the device to load. Use \"all\" to load the database of all devices." + }, + "reload": { + "name": "Reload", + "description": "Reloads all records. If true the current records are cleared from memory (does not effect the device) and the records are reloaded. If false the existing records are left in place and only missing records are added. Default is false." + } + } + }, + "print_all_link_database": { + "name": "Print all link database", + "description": "Prints the All-Link Database for a device. Requires that the All-Link Database is loaded into memory.", + "fields": { + "entity_id": { + "name": "Entity", + "description": "Name of the device to print." + } + } + }, + "print_im_all_link_database": { + "name": "Print IM all link database", + "description": "Prints the All-Link Database for the INSTEON Modem (IM)." + }, + "x10_all_units_off": { + "name": "X10 all units off", + "description": "Tells the Insteom Modem (IM) start All-Linking mode. Once the IM is in All-Linking mode, press the link button on the device to complete All-Linking.", + "fields": { + "housecode": { + "name": "Housecode", + "description": "X10 house code." + } + } + }, + "x10_all_lights_on": { + "name": "X10 all lights on", + "description": "Sends X10 All Lights On command.", + "fields": { + "housecode": { + "name": "Housecode", + "description": "X10 house code." + } + } + }, + "x10_all_lights_off": { + "name": "X10 all lights off", + "description": "Sends X10 All Lights Off command.", + "fields": { + "housecode": { + "name": "Housecode", + "description": "X10 house code." + } + } + }, + "scene_on": { + "name": "Scene on", + "description": "Triggers an INSTEON scene to turn ON.", + "fields": { + "group": { + "name": "Group", + "description": "INSTEON group or scene number." + } + } + }, + "scene_off": { + "name": "Scene off", + "description": "Triggers an INSTEON scene to turn OFF.", + "fields": { + "group": { + "name": "Group", + "description": "INSTEON group or scene number." + } + } + }, + "add_default_links": { + "name": "Add default links", + "description": "Adds the default links between the device and the Insteon Modem (IM).", + "fields": { + "entity_id": { + "name": "Entity", + "description": "Name of the device to load. Use \"all\" to load the database of all devices." + } + } + } } } diff --git a/homeassistant/components/iperf3/services.yaml b/homeassistant/components/iperf3/services.yaml index ba0fdb89712..b0cc4f11639 100644 --- a/homeassistant/components/iperf3/services.yaml +++ b/homeassistant/components/iperf3/services.yaml @@ -1,10 +1,6 @@ speedtest: - name: Speedtest - description: Immediately execute a speed test with iperf3 fields: host: - name: Host - description: The host name of the iperf3 server (already configured) to run a test with. example: "iperf.he.net" default: None selector: diff --git a/homeassistant/components/iperf3/strings.json b/homeassistant/components/iperf3/strings.json new file mode 100644 index 00000000000..be8535daec6 --- /dev/null +++ b/homeassistant/components/iperf3/strings.json @@ -0,0 +1,14 @@ +{ + "services": { + "speedtest": { + "name": "Speedtest", + "description": "Immediately executes a speed test with iperf3.", + "fields": { + "host": { + "name": "Host", + "description": "The host name of the iperf3 server (already configured) to run a test with." + } + } + } + } +} diff --git a/homeassistant/components/isy994/services.yaml b/homeassistant/components/isy994/services.yaml index b84fcdd73ef..7ce44f9edae 100644 --- a/homeassistant/components/isy994/services.yaml +++ b/homeassistant/components/isy994/services.yaml @@ -4,52 +4,36 @@ # flooding the ISY with requests. To control multiple devices with a service call # the recommendation is to add a scene in the ISY and control that scene. send_raw_node_command: - name: Send raw node command - description: Send a "raw" ISY REST Device Command to a Node using its Home Assistant Entity ID. target: entity: integration: isy994 fields: command: - name: Command - description: The ISY REST Command to be sent to the device required: true example: "DON" selector: text: value: - name: Value - description: The integer value to be sent with the command. selector: number: min: 0 max: 255 parameters: - name: Parameters - description: A dict of parameters to be sent in the query string (e.g. for controlling colored bulbs). example: { GV2: 0, GV3: 0, GV4: 255 } default: {} selector: object: unit_of_measurement: - name: Unit of measurement - description: The ISY Unit of Measurement (UOM) to send with the command, if required. selector: number: min: 0 max: 120 send_node_command: - name: Send node command - description: >- - Send a command to an ISY Device using its Home Assistant entity ID. Valid commands are: beep, brighten, dim, disable, - enable, fade_down, fade_stop, fade_up, fast_off, fast_on, and query. target: entity: integration: isy994 fields: command: - name: Command - description: The command to be sent to the device. required: true selector: select: @@ -66,34 +50,22 @@ send_node_command: - "fast_on" - "query" get_zwave_parameter: - name: Get Z-Wave Parameter - description: >- - Request a Z-Wave Device parameter via the ISY. The parameter value will be returned as a entity extra state attribute with the name "ZW_#" - where "#" is the parameter number. target: entity: integration: isy994 fields: parameter: - name: Parameter - description: The parameter number to retrieve from the device. example: 8 selector: number: min: 1 max: 255 set_zwave_parameter: - name: Set Z-Wave Parameter - description: >- - Update a Z-Wave Device parameter via the ISY. The parameter value will also be returned as a entity extra state attribute with the name "ZW_#" - where "#" is the parameter number. target: entity: integration: isy994 fields: parameter: - name: Parameter - description: The parameter number to set on the end device. required: true example: 8 selector: @@ -101,15 +73,11 @@ set_zwave_parameter: min: 1 max: 255 value: - name: Value - description: The value to set for the parameter. May be an integer or byte string (e.g. "0xFFFF"). required: true example: 33491663 selector: text: size: - name: Size - description: The size of the parameter, either 1, 2, or 4 bytes. required: true example: 4 selector: @@ -119,17 +87,12 @@ set_zwave_parameter: - "2" - "4" set_zwave_lock_user_code: - name: Set Z-Wave Lock User Code - description: >- - Set a Z-Wave Lock User Code via the ISY. target: entity: integration: isy994 domain: lock fields: user_num: - name: User Number - description: The user slot number on the lock required: true example: 8 selector: @@ -137,8 +100,6 @@ set_zwave_lock_user_code: min: 1 max: 255 code: - name: Code - description: The code to set for the user. required: true example: 33491663 selector: @@ -147,17 +108,12 @@ set_zwave_lock_user_code: max: 99999999 mode: box delete_zwave_lock_user_code: - name: Delete Z-Wave Lock User Code - description: >- - Delete a Z-Wave Lock User Code via the ISY. target: entity: integration: isy994 domain: lock fields: user_num: - name: User Number - description: The user slot number on the lock required: true example: 8 selector: @@ -165,43 +121,26 @@ delete_zwave_lock_user_code: min: 1 max: 255 rename_node: - name: Rename Node on ISY - description: >- - Rename a node or group (scene) on the ISY. Note: this will not automatically change the Home Assistant Entity Name or Entity ID to match. - The entity name and ID will only be updated after calling `isy994.reload` or restarting Home Assistant, and ONLY IF you have not already customized the - name within Home Assistant. target: entity: integration: isy994 fields: name: - name: New Name - description: The new name to use within the ISY. required: true example: "Front Door Light" selector: text: send_program_command: - name: Send program command - description: >- - Send a command to control an ISY program or folder. Valid commands are run, run_then, run_else, stop, enable, disable, - enable_run_at_startup, and disable_run_at_startup. fields: address: - name: Address - description: The address of the program to control (use either address or name). example: "04B1" selector: text: name: - name: Name - description: The name of the program to control (use either address or name). example: "My Program" selector: text: command: - name: Command - description: The ISY Program Command to be sent. required: true selector: select: @@ -215,8 +154,6 @@ send_program_command: - "run_then" - "stop" isy: - name: ISY - description: If you have more than one ISY connected, provide the name of the ISY to query (as shown on the Device Registry or as the top-first node in the ISY Admin Console). If you have the same program name or address on multiple ISYs, omitting this will run the command on them all. example: "ISY" selector: text: diff --git a/homeassistant/components/isy994/strings.json b/homeassistant/components/isy994/strings.json index 821f8889978..542df60f13f 100644 --- a/homeassistant/components/isy994/strings.json +++ b/homeassistant/components/isy994/strings.json @@ -36,7 +36,7 @@ "step": { "init": { "title": "ISY Options", - "description": "Set the options for the ISY Integration: \n • Node Sensor String: Any device or folder that contains 'Node Sensor String' in the name will be treated as a sensor or binary sensor. \n • Ignore String: Any device with 'Ignore String' in the name will be ignored. \n • Variable Sensor String: Any variable that contains 'Variable Sensor String' will be added as a sensor. \n • Restore Light Brightness: If enabled, the previous brightness will be restored when turning on a light instead of the device's built-in On-Level.", + "description": "Set the options for the ISY Integration: \n \u2022 Node Sensor String: Any device or folder that contains 'Node Sensor String' in the name will be treated as a sensor or binary sensor. \n \u2022 Ignore String: Any device with 'Ignore String' in the name will be ignored. \n \u2022 Variable Sensor String: Any variable that contains 'Variable Sensor String' will be added as a sensor. \n \u2022 Restore Light Brightness: If enabled, the previous brightness will be restored when turning on a light instead of the device's built-in On-Level.", "data": { "sensor_string": "Node Sensor String", "ignore_string": "Ignore String", @@ -53,5 +53,123 @@ "last_heartbeat": "Last Heartbeat Time", "websocket_status": "Event Socket Status" } + }, + "services": { + "send_raw_node_command": { + "name": "Send raw node command", + "description": "Set the options for the ISY Integration: \n \u2022 Node Sensor String: Any device or folder that contains 'Node Sensor String' in the name will be treated as a sensor or binary sensor. \n \u2022 Ignore String: Any device with 'Ignore String' in the name will be ignored. \n \u2022 Variable Sensor String: Any variable that contains 'Variable Sensor String' will be added as a sensor. \n \u2022 Restore Light Brightness: If enabled, the previous brightness will be restored when turning on a light instead of the device's built-in On-Level.", + "fields": { + "command": { + "name": "Command", + "description": "The ISY REST Command to be sent to the device." + }, + "value": { + "name": "Value", + "description": "The integer value to be sent with the command." + }, + "parameters": { + "name": "Parameters", + "description": "A dict of parameters to be sent in the query string (e.g. for controlling colored bulbs)." + }, + "unit_of_measurement": { + "name": "Unit of measurement", + "description": "The ISY Unit of Measurement (UOM) to send with the command, if required." + } + } + }, + "send_node_command": { + "name": "Send node command", + "description": "Sends a command to an ISY Device using its Home Assistant entity ID. Valid commands are: beep, brighten, dim, disable, enable, fade_down, fade_stop, fade_up, fast_off, fast_on, and query.", + "fields": { + "command": { + "name": "Command", + "description": "The command to be sent to the device." + } + } + }, + "get_zwave_parameter": { + "name": "Get Z-Wave Parameter", + "description": "Requests a Z-Wave Device parameter via the ISY. The parameter value will be returned as a entity extra state attribute with the name \"ZW_#\" where \"#\" is the parameter number.", + "fields": { + "parameter": { + "name": "Parameter", + "description": "The parameter number to retrieve from the device." + } + } + }, + "set_zwave_parameter": { + "name": "Set Z-Wave Parameter", + "description": "Updates a Z-Wave Device parameter via the ISY. The parameter value will also be returned as a entity extra state attribute with the name \"ZW_#\" where \"#\" is the parameter number.", + "fields": { + "parameter": { + "name": "Parameter", + "description": "The parameter number to set on the end device." + }, + "value": { + "name": "Value", + "description": "The value to set for the parameter. May be an integer or byte string (e.g. \"0xFFFF\")." + }, + "size": { + "name": "Size", + "description": "The size of the parameter, either 1, 2, or 4 bytes." + } + } + }, + "set_zwave_lock_user_code": { + "name": "Set Z-Wave Lock User Code", + "description": "Sets a Z-Wave Lock User Code via the ISY.", + "fields": { + "user_num": { + "name": "User Number", + "description": "The user slot number on the lock." + }, + "code": { + "name": "Code", + "description": "The code to set for the user." + } + } + }, + "delete_zwave_lock_user_code": { + "name": "Delete Z-Wave Lock User Code", + "description": "Delete a Z-Wave Lock User Code via the ISY.", + "fields": { + "user_num": { + "name": "User Number", + "description": "The user slot number on the lock." + } + } + }, + "rename_node": { + "name": "Rename Node on ISY", + "description": "Renames a node or group (scene) on the ISY. Note: this will not automatically change the Home Assistant Entity Name or Entity ID to match. The entity name and ID will only be updated after calling `isy994.reload` or restarting Home Assistant, and ONLY IF you have not already customized the name within Home Assistant.", + "fields": { + "name": { + "name": "New Name", + "description": "The new name to use within the ISY." + } + } + }, + "send_program_command": { + "name": "Send program command", + "description": "Sends a command to control an ISY program or folder. Valid commands are run, run_then, run_else, stop, enable, disable, enable_run_at_startup, and disable_run_at_startup.", + "fields": { + "address": { + "name": "Address", + "description": "The address of the program to control (use either address or name)." + }, + "name": { + "name": "Name", + "description": "The name of the program to control (use either address or name)." + }, + "command": { + "name": "Command", + "description": "The ISY Program Command to be sent." + }, + "isy": { + "name": "ISY", + "description": "If you have more than one ISY connected, provide the name of the ISY to query (as shown on the Device Registry or as the top-first node in the ISY Admin Console). If you have the same program name or address on multiple ISYs, omitting this will run the command on them all." + } + } + } } } diff --git a/homeassistant/components/izone/services.yaml b/homeassistant/components/izone/services.yaml index 5cecbb68a9f..f1a8fe5c8e5 100644 --- a/homeassistant/components/izone/services.yaml +++ b/homeassistant/components/izone/services.yaml @@ -1,14 +1,10 @@ airflow_min: - name: Set minimum airflow - description: Set the airflow minimum percent for a zone target: entity: integration: izone domain: climate fields: airflow: - name: Percent - description: Airflow percent. required: true selector: number: @@ -17,16 +13,12 @@ airflow_min: step: 5 unit_of_measurement: "%" airflow_max: - name: Set maximum airflow - description: Set the airflow maximum percent for a zone target: entity: integration: izone domain: climate fields: airflow: - name: Percent - description: Airflow percent. required: true selector: number: diff --git a/homeassistant/components/izone/strings.json b/homeassistant/components/izone/strings.json index 7d1e8f1d476..3906dcb89fe 100644 --- a/homeassistant/components/izone/strings.json +++ b/homeassistant/components/izone/strings.json @@ -9,5 +9,27 @@ "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]", "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]" } + }, + "services": { + "airflow_min": { + "name": "Set minimum airflow", + "description": "Sets the airflow minimum percent for a zone.", + "fields": { + "airflow": { + "name": "Percent", + "description": "Airflow percent." + } + } + }, + "airflow_max": { + "name": "Set maximum airflow", + "description": "Sets the airflow maximum percent for a zone.", + "fields": { + "airflow": { + "name": "Percent", + "description": "Airflow percent." + } + } + } } } diff --git a/homeassistant/components/keba/services.yaml b/homeassistant/components/keba/services.yaml index 8e5e8cd91f8..daa1749a34c 100644 --- a/homeassistant/components/keba/services.yaml +++ b/homeassistant/components/keba/services.yaml @@ -1,28 +1,11 @@ # Describes the format for available services for KEBA charging staitons request_data: - name: Request data - description: > - Request new data from the charging station. - authorize: - name: Authorize - description: > - Authorizes a charging process with the predefined RFID tag of the configuration file. - deauthorize: - name: Deauthorize - description: > - Deauthorizes the running charging process with the predefined RFID tag of the configuration file. - set_energy: - name: Set energy - description: Sets the energy target after which the charging process stops. fields: energy: - name: Energy - description: > - The energy target to stop charging. Setting 0 disables the limit. selector: number: min: 0 @@ -31,15 +14,8 @@ set_energy: unit_of_measurement: "kWh" set_current: - name: Set current - description: Sets the maximum current for charging processes. fields: current: - name: Current - description: > - The maximum current used for the charging process. - The value is depending on the DIP-switch settings and the used cable of the - charging station. default: 6 selector: number: @@ -49,24 +25,10 @@ set_current: unit_of_measurement: "A" enable: - name: Enable - description: > - Starts a charging process if charging station is authorized. - disable: - name: Disable - description: > - Stops the charging process if charging station is authorized. - set_failsafe: - name: Set failsafe - description: > - Set the failsafe mode of the charging station. If all parameters are 0, the failsafe mode will be disabled. fields: failsafe_timeout: - name: Failsafe timeout - description: > - Timeout after which the failsafe mode is triggered, if set_current was not executed during this time. default: 30 selector: number: @@ -74,9 +36,6 @@ set_failsafe: max: 3600 unit_of_measurement: seconds failsafe_fallback: - name: Failsafe fallback - description: > - Fallback current to be set after timeout. default: 6 selector: number: @@ -85,9 +44,6 @@ set_failsafe: step: 0.1 unit_of_measurement: "A" failsafe_persist: - name: Failsafe persist - description: > - If failsafe_persist is 0, the failsafe option is only until charging station reboot. If failsafe_persist is 1, the failsafe option will survive a reboot. default: 0 selector: number: diff --git a/homeassistant/components/keba/strings.json b/homeassistant/components/keba/strings.json new file mode 100644 index 00000000000..140ab6ea949 --- /dev/null +++ b/homeassistant/components/keba/strings.json @@ -0,0 +1,62 @@ +{ + "services": { + "request_data": { + "name": "Request data", + "description": "Requesta new data from the charging station." + }, + "authorize": { + "name": "Authorize", + "description": "Authorizes a charging process with the predefined RFID tag of the configuration file." + }, + "deauthorize": { + "name": "Deauthorize", + "description": "Deauthorizes the running charging process with the predefined RFID tag of the configuration file." + }, + "set_energy": { + "name": "Set energy", + "description": "Sets the energy target after which the charging process stops.", + "fields": { + "energy": { + "name": "Energy", + "description": "The energy target to stop charging. Setting 0 disables the limit." + } + } + }, + "set_current": { + "name": "Set current", + "description": "Sets the maximum current for charging processes.", + "fields": { + "current": { + "name": "Current", + "description": "The maximum current used for the charging process. The value is depending on the DIP-switch settings and the used cable of the charging station." + } + } + }, + "enable": { + "name": "Enable", + "description": "Starts a charging process if charging station is authorized." + }, + "disable": { + "name": "Disable", + "description": "Stops the charging process if charging station is authorized." + }, + "set_failsafe": { + "name": "Set failsafe", + "description": "Sets the failsafe mode of the charging station. If all parameters are 0, the failsafe mode will be disabled.", + "fields": { + "failsafe_timeout": { + "name": "Failsafe timeout", + "description": "Timeout after which the failsafe mode is triggered, if set_current was not executed during this time." + }, + "failsafe_fallback": { + "name": "Failsafe fallback", + "description": "Fallback current to be set after timeout." + }, + "failsafe_persist": { + "name": "Failsafe persist", + "description": "If failsafe_persist is 0, the failsafe option is only until charging station reboot. If failsafe_persist is 1, the failsafe option will survive a reboot." + } + } + } + } +} diff --git a/homeassistant/components/kef/services.yaml b/homeassistant/components/kef/services.yaml index cf364edcf21..9c5e5083794 100644 --- a/homeassistant/components/kef/services.yaml +++ b/homeassistant/components/kef/services.yaml @@ -1,14 +1,10 @@ update_dsp: - name: Update DSP - description: Update all DSP settings. target: entity: integration: kef domain: media_player set_mode: - name: Set mode - description: Set the mode of the speaker. target: entity: integration: kef @@ -16,36 +12,24 @@ set_mode: fields: desk_mode: - name: Desk mode - description: Desk mode. selector: boolean: wall_mode: - name: Wall mode - description: Wall mode. selector: boolean: phase_correction: - name: Phase correction - description: Phase correction. selector: boolean: high_pass: - name: High pass - description: High-pass mode". selector: boolean: sub_polarity: - name: Subwoofer polarity - description: Sub polarity. selector: select: options: - "-" - "+" bass_extension: - name: Base extension - description: Bass extension. selector: select: options: @@ -54,16 +38,12 @@ set_mode: - "Extra" set_desk_db: - name: Set desk dB - description: Set the "Desk mode" slider of the speaker in dB. target: entity: integration: kef domain: media_player fields: db_value: - name: dB value - description: Value of the slider example: 0.0 selector: number: @@ -73,16 +53,12 @@ set_desk_db: unit_of_measurement: dB set_wall_db: - name: Set wall dB - description: Set the "Wall mode" slider of the speaker in dB. target: entity: integration: kef domain: media_player fields: db_value: - name: dB value - description: Value of the slider. selector: number: min: -6 @@ -91,16 +67,12 @@ set_wall_db: unit_of_measurement: dB set_treble_db: - name: Set treble dB - description: Set desk the "Treble trim" slider of the speaker in dB. target: entity: integration: kef domain: media_player fields: db_value: - name: dB value - description: Value of the slider. selector: number: min: -2 @@ -109,16 +81,12 @@ set_treble_db: unit_of_measurement: dB set_high_hz: - name: Set high hertz - description: Set the "High-pass mode" slider of the speaker in Hz. target: entity: integration: kef domain: media_player fields: hz_value: - name: Hertz value - description: Value of the slider. selector: number: min: 50 @@ -127,16 +95,12 @@ set_high_hz: unit_of_measurement: Hz set_low_hz: - name: Set low Hertz - description: Set the "Sub out low-pass frequency" slider of the speaker in Hz. target: entity: integration: kef domain: media_player fields: hz_value: - name: Hertz value - description: Value of the slider. selector: number: min: 40 @@ -145,16 +109,12 @@ set_low_hz: unit_of_measurement: Hz set_sub_db: - name: Set subwoofer dB - description: Set the "Sub gain" slider of the speaker in dB. target: entity: integration: kef domain: media_player fields: db_value: - name: dB value - description: Value of the slider. selector: number: min: -10 diff --git a/homeassistant/components/kef/strings.json b/homeassistant/components/kef/strings.json new file mode 100644 index 00000000000..7307caa6bb3 --- /dev/null +++ b/homeassistant/components/kef/strings.json @@ -0,0 +1,98 @@ +{ + "services": { + "update_dsp": { + "name": "Update DSP", + "description": "Updates all DSP settings." + }, + "set_mode": { + "name": "Set mode", + "description": "Sets the mode of the speaker.", + "fields": { + "desk_mode": { + "name": "Desk mode", + "description": "Desk mode." + }, + "wall_mode": { + "name": "Wall mode", + "description": "Wall mode." + }, + "phase_correction": { + "name": "Phase correction", + "description": "Phase correction." + }, + "high_pass": { + "name": "High pass", + "description": "High-pass mode\"." + }, + "sub_polarity": { + "name": "Subwoofer polarity", + "description": "Sub polarity." + }, + "bass_extension": { + "name": "Base extension", + "description": "Bass extension." + } + } + }, + "set_desk_db": { + "name": "Set desk dB", + "description": "Sets the \"Desk mode\" slider of the speaker in dB.", + "fields": { + "db_value": { + "name": "DB value", + "description": "Value of the slider." + } + } + }, + "set_wall_db": { + "name": "Set wall dB", + "description": "Sets the \"Wall mode\" slider of the speaker in dB.", + "fields": { + "db_value": { + "name": "DB value", + "description": "Value of the slider." + } + } + }, + "set_treble_db": { + "name": "Set treble dB", + "description": "Sets desk the \"Treble trim\" slider of the speaker in dB.", + "fields": { + "db_value": { + "name": "DB value", + "description": "Value of the slider." + } + } + }, + "set_high_hz": { + "name": "Set high hertz", + "description": "Sets the \"High-pass mode\" slider of the speaker in Hz.", + "fields": { + "hz_value": { + "name": "Hertz value", + "description": "Value of the slider." + } + } + }, + "set_low_hz": { + "name": "Sets low Hertz", + "description": "Set the \"Sub out low-pass frequency\" slider of the speaker in Hz.", + "fields": { + "hz_value": { + "name": "Hertz value", + "description": "Value of the slider." + } + } + }, + "set_sub_db": { + "name": "Sets subwoofer dB", + "description": "Set the \"Sub gain\" slider of the speaker in dB.", + "fields": { + "db_value": { + "name": "DB value", + "description": "Value of the slider." + } + } + } + } +} diff --git a/homeassistant/components/keyboard/services.yaml b/homeassistant/components/keyboard/services.yaml index 07f02959c39..b236f8eb80e 100644 --- a/homeassistant/components/keyboard/services.yaml +++ b/homeassistant/components/keyboard/services.yaml @@ -1,35 +1,6 @@ volume_up: - name: Volume up - description: - Simulates a key press of the "Volume Up" button on Home Assistant's host - machine - volume_down: - name: Volume down - description: - Simulates a key press of the "Volume Down" button on Home Assistant's host - machine - volume_mute: - name: Volume mute - description: - Simulates a key press of the "Volume Mute" button on Home Assistant's host - machine - media_play_pause: - name: Media play/pause - description: - Simulates a key press of the "Media Play/Pause" button on Home Assistant's - host machine - media_next_track: - name: Media next track - description: - Simulates a key press of the "Media Next Track" button on Home Assistant's - host machine - media_prev_track: - name: Media previous track - description: - Simulates a key press of the "Media Previous Track" button on Home - Assistant's host machine diff --git a/homeassistant/components/keyboard/strings.json b/homeassistant/components/keyboard/strings.json new file mode 100644 index 00000000000..1b744cb7a71 --- /dev/null +++ b/homeassistant/components/keyboard/strings.json @@ -0,0 +1,28 @@ +{ + "services": { + "volume_up": { + "name": "Volume up", + "description": "Simulates a key press of the \"Volume Up\" button on Home Assistant's host machine." + }, + "volume_down": { + "name": "Volume down", + "description": "Simulates a key press of the \"Volume Down\" button on Home Assistant's host machine." + }, + "volume_mute": { + "name": "Volume mute", + "description": "Simulates a key press of the \"Volume Mute\" button on Home Assistant's host machine." + }, + "media_play_pause": { + "name": "Media play/pause", + "description": "Simulates a key press of the \"Media Play/Pause\" button on Home Assistant's host machine." + }, + "media_next_track": { + "name": "Media next track", + "description": "Simulates a key press of the \"Media Next Track\" button on Home Assistant's host machine." + }, + "media_prev_track": { + "name": "Media previous track", + "description": "Simulates a key press of the \"Media Previous Track\" button on Home Assistant's host machine." + } + } +} diff --git a/homeassistant/components/keymitt_ble/services.yaml b/homeassistant/components/keymitt_ble/services.yaml index c611577eb26..2be5c07c804 100644 --- a/homeassistant/components/keymitt_ble/services.yaml +++ b/homeassistant/components/keymitt_ble/services.yaml @@ -1,17 +1,11 @@ calibrate: - name: Calibrate - description: Calibration - Set depth, press & hold duration, and operation mode. Warning - this will send a push command to the device fields: entity_id: - name: Entity - description: Name of entity to calibrate selector: entity: integration: keymitt_ble domain: switch depth: - name: Depth - description: Depth in percent example: 50 required: true selector: @@ -22,8 +16,6 @@ calibrate: max: 100 unit_of_measurement: "%" duration: - name: Duration - description: Duration in seconds example: 1 required: true selector: @@ -34,8 +26,6 @@ calibrate: max: 60 unit_of_measurement: seconds mode: - name: Mode - description: normal | invert | toggle example: "normal" required: true selector: diff --git a/homeassistant/components/keymitt_ble/strings.json b/homeassistant/components/keymitt_ble/strings.json index fd8e1f4825d..57e7fc68582 100644 --- a/homeassistant/components/keymitt_ble/strings.json +++ b/homeassistant/components/keymitt_ble/strings.json @@ -23,5 +23,29 @@ "unknown": "[%key:common::config_flow::error::unknown%]", "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]" } + }, + "services": { + "calibrate": { + "name": "Calibrate", + "description": "Calibration - Set depth, press & hold duration, and operation mode. Warning - this will send a push command to the device.", + "fields": { + "entity_id": { + "name": "Entity", + "description": "Name of entity to calibrate." + }, + "depth": { + "name": "Depth", + "description": "Depth in percent." + }, + "duration": { + "name": "Duration", + "description": "Duration in seconds." + }, + "mode": { + "name": "Mode", + "description": "Normal | invert | toggle." + } + } + } } } diff --git a/homeassistant/components/knx/services.yaml b/homeassistant/components/knx/services.yaml index 0ad497a30a2..813bf758eb0 100644 --- a/homeassistant/components/knx/services.yaml +++ b/homeassistant/components/knx/services.yaml @@ -1,111 +1,73 @@ send: - name: "Send to KNX bus" - description: "Send arbitrary data directly to the KNX bus." fields: address: - name: "Group address" - description: "Group address(es) to write to. Lists will send to multiple group addresses successively." required: true example: "1/1/0" selector: object: payload: - name: "Payload" - description: "Payload to send to the bus. Integers are treated as DPT 1/2/3 payloads. For DPTs > 6 bits send a list. Each value represents 1 octet (0-255). Pad with 0 to DPT byte length." required: true example: "[0, 4]" selector: object: type: - name: "Value type" - description: "If set, the payload will not be sent as raw bytes, but encoded as given DPT. KNX sensor types are valid values (see https://www.home-assistant.io/integrations/knx/#value-types)." required: false example: "temperature" selector: text: response: - name: "Send as Response" - description: "If set to `True`, the telegram will be sent as a `GroupValueResponse` instead of a `GroupValueWrite`." default: false selector: boolean: read: - name: "Read from KNX bus" - description: "Send GroupValueRead requests to the KNX bus. Response can be used from `knx_event` and will be processed in KNX entities." fields: address: - name: "Group address" - description: "Group address(es) to send read request to. Lists will read multiple group addresses." required: true example: "1/1/0" selector: object: event_register: - name: "Register knx_event" - description: "Add or remove group addresses to knx_event filter for triggering `knx_event`s. Only addresses added with this service can be removed." fields: address: - name: "Group address" - description: "Group address(es) that shall be added or removed. Lists are allowed." required: true example: "1/1/0" selector: object: type: - name: "Value type" - description: "If set, the payload will be decoded as given DPT in the event data `value` key. KNX sensor types are valid values (see https://www.home-assistant.io/integrations/knx/#value-types)." required: false example: "2byte_float" selector: text: remove: - name: "Remove event registration" - description: "If `True` the group address(es) will be removed." default: false selector: boolean: exposure_register: - name: "Expose to KNX bus" - description: "Add or remove exposures to KNX bus. Only exposures added with this service can be removed." fields: address: - name: "Group address" - description: "Group address state or attribute updates will be sent to. GroupValueRead requests will be answered. Per address only one exposure can be registered." required: true example: "1/1/0" selector: text: type: - name: "Value type" - description: "Telegrams will be encoded as given DPT. 'binary' and all KNX sensor types are valid values (see https://www.home-assistant.io/integrations/knx/#value-types)" required: true example: "percentU8" selector: text: entity_id: - name: "Entity" - description: "Entity id whose state or attribute shall be exposed." required: true selector: entity: attribute: - name: "Entity attribute" - description: "Attribute of the entity that shall be sent to the KNX bus. If not set the state will be sent. Eg. for a light the state is eigther “on” or “off” - with attribute you can expose its “brightness”." example: "brightness" selector: text: default: - name: "Default value" - description: "Default value to send to the bus if the state or attribute value is None. Eg. a light with state “off” has no brightness attribute so a default value of 0 could be used. If not set (or None) no value would be sent to the bus and a GroupReadRequest to the address would return the last known value." example: "0" selector: object: remove: - name: "Remove exposure" - description: "If `True` the exposure will be removed. Only `address` is required for removal." default: false selector: boolean: reload: - name: Reload - description: Reload the KNX integration. diff --git a/homeassistant/components/knx/strings.json b/homeassistant/components/knx/strings.json index cdd61379567..9a17fed506c 100644 --- a/homeassistant/components/knx/strings.json +++ b/homeassistant/components/knx/strings.json @@ -288,5 +288,91 @@ "trigger_type": { "telegram": "Telegram sent or received" } + }, + "services": { + "send": { + "name": "Send to KNX bus", + "description": "Sends arbitrary data directly to the KNX bus.", + "fields": { + "address": { + "name": "Group address", + "description": "Group address(es) to write to. Lists will send to multiple group addresses successively." + }, + "payload": { + "name": "Payload", + "description": "Payload to send to the bus. Integers are treated as DPT 1/2/3 payloads. For DPTs > 6 bits send a list. Each value represents 1 octet (0-255). Pad with 0 to DPT byte length." + }, + "type": { + "name": "Value type", + "description": "If set, the payload will not be sent as raw bytes, but encoded as given DPT. KNX sensor types are valid values (see https://www.home-assistant.io/integrations/knx/#value-types)." + }, + "response": { + "name": "Send as Response", + "description": "If set to `True`, the telegram will be sent as a `GroupValueResponse` instead of a `GroupValueWrite`." + } + } + }, + "read": { + "name": "Reads from KNX bus", + "description": "Send GroupValueRead requests to the KNX bus. Response can be used from `knx_event` and will be processed in KNX entities.", + "fields": { + "address": { + "name": "Group address", + "description": "Group address(es) to send read request to. Lists will read multiple group addresses." + } + } + }, + "event_register": { + "name": "Registers knx_event", + "description": "Add or remove group addresses to knx_event filter for triggering `knx_event`s. Only addresses added with this service can be removed.", + "fields": { + "address": { + "name": "Group address", + "description": "Group address(es) that shall be added or removed. Lists are allowed." + }, + "type": { + "name": "Value type", + "description": "If set, the payload will be decoded as given DPT in the event data `value` key. KNX sensor types are valid values (see https://www.home-assistant.io/integrations/knx/#value-types)." + }, + "remove": { + "name": "Remove event registration", + "description": "If `True` the group address(es) will be removed." + } + } + }, + "exposure_register": { + "name": "Expose to KNX bus", + "description": "Adds or remove exposures to KNX bus. Only exposures added with this service can be removed.", + "fields": { + "address": { + "name": "Group address", + "description": "Group address state or attribute updates will be sent to. GroupValueRead requests will be answered. Per address only one exposure can be registered." + }, + "type": { + "name": "Value type", + "description": "Telegrams will be encoded as given DPT. 'binary' and all KNX sensor types are valid values (see https://www.home-assistant.io/integrations/knx/#value-types)." + }, + "entity_id": { + "name": "Entity", + "description": "Entity id whose state or attribute shall be exposed." + }, + "attribute": { + "name": "Entity attribute", + "description": "Attribute of the entity that shall be sent to the KNX bus. If not set the state will be sent. Eg. for a light the state is eigther \u201con\u201d or \u201coff\u201d - with attribute you can expose its \u201cbrightness\u201d." + }, + "default": { + "name": "Default value", + "description": "Default value to send to the bus if the state or attribute value is None. Eg. a light with state \u201coff\u201d has no brightness attribute so a default value of 0 could be used. If not set (or None) no value would be sent to the bus and a GroupReadRequest to the address would return the last known value." + }, + "remove": { + "name": "Remove exposure", + "description": "If `True` the exposure will be removed. Only `address` is required for removal." + } + } + }, + "reload": { + "name": "Reload", + "description": "Reloads the KNX integration." + } } } diff --git a/homeassistant/components/kodi/services.yaml b/homeassistant/components/kodi/services.yaml index cf6cdfc240d..76ed0aca22d 100644 --- a/homeassistant/components/kodi/services.yaml +++ b/homeassistant/components/kodi/services.yaml @@ -1,50 +1,36 @@ # Describes the format for available Kodi services add_to_playlist: - name: Add to playlist - description: Add music to the default playlist (i.e. playlistid=0). target: entity: integration: kodi domain: media_player fields: media_type: - name: Media type - description: Media type identifier. It must be one of SONG or ALBUM. required: true example: ALBUM selector: text: media_id: - name: Media ID - description: Unique Id of the media entry to add (`songid` or albumid`). If not defined, `media_name` and `artist_name` are needed to search the Kodi music library. example: 123456 selector: text: media_name: - name: Media Name - description: Optional media name for filtering media. Can be 'ALL' when `media_type` is 'ALBUM' and `artist_name` is specified, to add all songs from one artist. example: "Highway to Hell" selector: text: artist_name: - name: Artist name - description: Optional artist name for filtering media. example: "AC/DC" selector: text: call_method: - name: Call method - description: "Call a Kodi JSONRPC API method with optional parameters. Results of the Kodi API call will be redirected in a Home Assistant event: `kodi_call_method_result`." target: entity: integration: kodi domain: media_player fields: method: - name: Method - description: Name of the Kodi JSONRPC API method to be called. required: true example: "VideoLibrary.GetRecentlyAddedEpisodes" selector: diff --git a/homeassistant/components/kodi/strings.json b/homeassistant/components/kodi/strings.json index 8097eb6336b..f7ee375f990 100644 --- a/homeassistant/components/kodi/strings.json +++ b/homeassistant/components/kodi/strings.json @@ -46,5 +46,39 @@ "turn_on": "[%key:common::device_automation::action_type::turn_on%]", "turn_off": "[%key:common::device_automation::action_type::turn_off%]" } + }, + "services": { + "add_to_playlist": { + "name": "Add to playlist", + "description": "Adds music to the default playlist (i.e. playlistid=0).", + "fields": { + "media_type": { + "name": "Media type", + "description": "Media type identifier. It must be one of SONG or ALBUM." + }, + "media_id": { + "name": "Media ID", + "description": "Unique Id of the media entry to add (`songid` or albumid`). If not defined, `media_name` and `artist_name` are needed to search the Kodi music library." + }, + "media_name": { + "name": "Media name", + "description": "Optional media name for filtering media. Can be 'ALL' when `media_type` is 'ALBUM' and `artist_name` is specified, to add all songs from one artist." + }, + "artist_name": { + "name": "Artist name", + "description": "Optional artist name for filtering media." + } + } + }, + "call_method": { + "name": "Call method", + "description": "Calls a Kodi JSONRPC API method with optional parameters. Results of the Kodi API call will be redirected in a Home Assistant event: `kodi_call_method_result`.", + "fields": { + "method": { + "name": "Method", + "description": "Name of the Kodi JSONRPC API method to be called." + } + } + } } }