From 6f5629cf1406f382e994fe0336fbbfa54ac0a81b Mon Sep 17 00:00:00 2001 From: tkdrob Date: Fri, 14 May 2021 07:38:41 -0400 Subject: [PATCH] Add targets and selectors for services (B-C) (#50189) --- .../components/bayesian/services.yaml | 1 + .../components/blackbird/services.yaml | 11 ++++++ homeassistant/components/blink/services.yaml | 23 ++++++++++--- .../components/bluesound/services.yaml | 34 +++++++++++++++++-- .../bluetooth_tracker/services.yaml | 1 + .../bmw_connected_drive/services.yaml | 21 ++++++++++++ .../components/channels/services.yaml | 33 ++++++++++++------ homeassistant/components/cloud/services.yaml | 2 ++ .../components/cloudflare/services.yaml | 1 + .../components/command_line/services.yaml | 1 + 10 files changed, 111 insertions(+), 17 deletions(-) diff --git a/homeassistant/components/bayesian/services.yaml b/homeassistant/components/bayesian/services.yaml index 2fe3a4f7c9b..c1dc891805a 100644 --- a/homeassistant/components/bayesian/services.yaml +++ b/homeassistant/components/bayesian/services.yaml @@ -1,2 +1,3 @@ reload: + name: Reload description: Reload all bayesian entities diff --git a/homeassistant/components/blackbird/services.yaml b/homeassistant/components/blackbird/services.yaml index a783dff241b..7b3096c25e4 100644 --- a/homeassistant/components/blackbird/services.yaml +++ b/homeassistant/components/blackbird/services.yaml @@ -1,9 +1,20 @@ set_all_zones: + name: Set all zones description: Set all Blackbird zones to a single source. fields: entity_id: + name: Entity description: Name of any blackbird zone. + required: true example: "media_player.zone_1" + selector: + entity: + integration: blackbird + domain: media_player source: + name: Source description: Name of source to switch to. + required: true example: "Source 1" + selector: + text: diff --git a/homeassistant/components/blink/services.yaml b/homeassistant/components/blink/services.yaml index 6ea4e2aa9ac..89af4799c85 100644 --- a/homeassistant/components/blink/services.yaml +++ b/homeassistant/components/blink/services.yaml @@ -1,28 +1,43 @@ # Describes the format for available Blink services blink_update: + name: Update description: Force a refresh. trigger_camera: + name: Trigger camera description: Request camera to take new image. - fields: - entity_id: - description: Name(s) of camera entities to take new image. - example: "camera.living_room_camera" + target: + entity: + integration: blink + domain: camera save_video: + name: Save video description: Save last recorded video clip to local file. fields: name: + name: Name description: Name of camera to grab video from. + required: true example: "Living Room" + selector: + text: filename: + name: File name description: Filename to writable path (directory may need to be included in whitelist_dirs in config) + required: true example: "/tmp/video.mp4" + selector: + text: send_pin: + name: Send pin description: Send a new PIN to blink for 2FA. fields: pin: + name: Pin description: PIN received from blink. Leave empty if you only received a verification email. example: "abc123" + selector: + text: diff --git a/homeassistant/components/bluesound/services.yaml b/homeassistant/components/bluesound/services.yaml index 0ca12c9e2ae..992fd34a0bc 100644 --- a/homeassistant/components/bluesound/services.yaml +++ b/homeassistant/components/bluesound/services.yaml @@ -1,30 +1,60 @@ join: + name: Join description: Group player together. fields: master: + name: Master description: Entity ID of the player that should become the master of the group. + required: true example: "media_player.bluesound_livingroom" + selector: + entity: + integration: bluesound + domain: media_player entity_id: - description: Name(s) of entities that will coordinate the grouping. Platform dependent. + name: Entity + description: Name of entity that will coordinate the grouping. Platform dependent. example: "media_player.bluesound_livingroom" + selector: + entity: + integration: bluesound + domain: media_player unjoin: + name: Unjoin description: Unjoin the player from a group. fields: entity_id: - description: Name(s) of entities that will be unjoined from their group. Platform dependent. + name: Entity + description: Name of entity that will be unjoined from their group. Platform dependent. example: "media_player.bluesound_livingroom" + selector: + entity: + integration: bluesound + domain: media_player set_sleep_timer: + name: Set sleep timer description: "Set a Bluesound timer. It will increase timer in steps: 15, 30, 45, 60, 90, 0" fields: entity_id: + name: Entity description: Name(s) of entities that will have a timer set. example: "media_player.bluesound_livingroom" + selector: + entity: + integration: bluesound + domain: media_player clear_sleep_timer: + name: Clear sleep timer description: Clear a Bluesound timer. fields: entity_id: + name: Entity description: Name(s) of entities that will have the timer cleared. example: "media_player.bluesound_livingroom" + selector: + entity: + integration: bluesound + domain: media_player diff --git a/homeassistant/components/bluetooth_tracker/services.yaml b/homeassistant/components/bluetooth_tracker/services.yaml index 01b31eee63e..3150403dbf1 100644 --- a/homeassistant/components/bluetooth_tracker/services.yaml +++ b/homeassistant/components/bluetooth_tracker/services.yaml @@ -1,2 +1,3 @@ update: + name: Update description: Trigger manual tracker update diff --git a/homeassistant/components/bmw_connected_drive/services.yaml b/homeassistant/components/bmw_connected_drive/services.yaml index 170289edaea..563e14e5577 100644 --- a/homeassistant/components/bmw_connected_drive/services.yaml +++ b/homeassistant/components/bmw_connected_drive/services.yaml @@ -4,26 +4,37 @@ # component to avoid redundancy. light_flash: + name: Flash lights description: > Flash the lights of the vehicle. The vehicle is identified via the vin (see below). fields: vin: + name: VIN description: > The vehicle identification number (VIN) of the vehicle, 17 characters + required: true example: WBANXXXXXX1234567 + selector: + text: sound_horn: + name: Sound horn description: > Sound the horn of the vehicle. The vehicle is identified via the vin (see below). fields: vin: + name: VIN description: > The vehicle identification number (VIN) of the vehicle, 17 characters + required: true example: WBANXXXXXX1234567 + selector: + text: activate_air_conditioning: + name: Activate air conditioning description: > Start the air conditioning of the vehicle. What exactly is started here depends on the type of vehicle. It might range from just ventilation over @@ -31,21 +42,31 @@ activate_air_conditioning: the vin (see below). fields: vin: + name: VIN description: > The vehicle identification number (VIN) of the vehicle, 17 characters + required: true example: WBANXXXXXX1234567 + selector: + text: find_vehicle: + name: Find vehicle description: > Request vehicle to update the gps location. The vehicle is identified via the vin (see below). fields: vin: + name: VIN description: > The vehicle identification number (VIN) of the vehicle, 17 characters + required: true example: WBANXXXXXX1234567 + selector: + text: update_state: + name: Update state description: > Fetch the last state of the vehicles of all your accounts from the BMW server. This does *not* trigger an update from the vehicle, it just gets diff --git a/homeassistant/components/channels/services.yaml b/homeassistant/components/channels/services.yaml index f06b2bfd905..f5b4639817e 100644 --- a/homeassistant/components/channels/services.yaml +++ b/homeassistant/components/channels/services.yaml @@ -1,23 +1,34 @@ seek_forward: + name: Seek forward description: Seek forward by a set number of seconds. - fields: - entity_id: - description: Name of entity for the instance of Channels to seek in. - example: "media_player.family_room_channels" + target: + entity: + integration: channels + domain: media_player seek_backward: + name: Seek backward description: Seek backward by a set number of seconds. - fields: - entity_id: - description: Name of entity for the instance of Channels to seek in. - example: "media_player.family_room_channels" + target: + entity: + integration: channels + domain: media_player seek_by: + name: Seek by description: Seek by an inputted number of seconds. + target: + entity: + integration: channels + domain: media_player fields: - entity_id: - description: Name of entity for the instance of Channels to seek in. - example: "media_player.family_room_channels" seconds: + name: Seconds description: Number of seconds to seek by. Negative numbers seek backwards. + required: true example: 120 + selector: + number: + min: -3600 + max: 3600 + unit_of_measurement: seconds diff --git a/homeassistant/components/cloud/services.yaml b/homeassistant/components/cloud/services.yaml index a7fb6b2f21b..1b676ea6be9 100644 --- a/homeassistant/components/cloud/services.yaml +++ b/homeassistant/components/cloud/services.yaml @@ -1,7 +1,9 @@ # Describes the format for available cloud services remote_connect: + name: Remote connect description: Make instance UI available outside over NabuCasa cloud remote_disconnect: + name: Remote disconnect description: Disconnect UI from NabuCasa cloud diff --git a/homeassistant/components/cloudflare/services.yaml b/homeassistant/components/cloudflare/services.yaml index 80165700dbb..f9465e788d8 100644 --- a/homeassistant/components/cloudflare/services.yaml +++ b/homeassistant/components/cloudflare/services.yaml @@ -1,2 +1,3 @@ update_records: + name: Update records description: Manually trigger update to Cloudflare records diff --git a/homeassistant/components/command_line/services.yaml b/homeassistant/components/command_line/services.yaml index de010ba8b85..f4cec426860 100644 --- a/homeassistant/components/command_line/services.yaml +++ b/homeassistant/components/command_line/services.yaml @@ -1,2 +1,3 @@ reload: + name: Reload description: Reload all command_line entities