From 9e0730c97f4b22188f4ab0b4f7f4ac74afeca0f6 Mon Sep 17 00:00:00 2001 From: tkdrob Date: Wed, 12 May 2021 05:00:32 -0400 Subject: [PATCH] Add targets and selectors for services (F) (#50191) --- .../components/facebox/services.yaml | 14 ++++++ .../components/fastdotcom/services.yaml | 1 + homeassistant/components/ffmpeg/services.yaml | 24 +++++++-- .../components/filesize/services.yaml | 1 + homeassistant/components/filter/services.yaml | 1 + homeassistant/components/flo/services.yaml | 50 +++++++++++++------ homeassistant/components/foscam/services.yaml | 44 ++++++++++++---- .../components/foursquare/services.yaml | 42 +++++++++++++--- .../components/freebox/services.yaml | 2 +- 9 files changed, 144 insertions(+), 35 deletions(-) diff --git a/homeassistant/components/facebox/services.yaml b/homeassistant/components/facebox/services.yaml index caa2e7df2c6..9c89c5e5c41 100644 --- a/homeassistant/components/facebox/services.yaml +++ b/homeassistant/components/facebox/services.yaml @@ -1,12 +1,26 @@ teach_face: + name: Teach face description: Teach facebox a face using a file. fields: entity_id: + name: Entity description: The facebox entity to teach. example: "image_processing.facebox" + selector: + entity: + integration: facebox + domain: image_processing name: + name: Name description: The name of the face to teach. + required: true example: "my_name" + selector: + text: file_path: + name: File path description: The path to the image file. + required: true example: "/images/my_image.jpg" + selector: + text: diff --git a/homeassistant/components/fastdotcom/services.yaml b/homeassistant/components/fastdotcom/services.yaml index 3664f9ece9f..75963557a03 100644 --- a/homeassistant/components/fastdotcom/services.yaml +++ b/homeassistant/components/fastdotcom/services.yaml @@ -1,2 +1,3 @@ speedtest: + name: Speed test description: Immediately execute a speed test with Fast.com diff --git a/homeassistant/components/ffmpeg/services.yaml b/homeassistant/components/ffmpeg/services.yaml index 15afa82ed0a..a00a820ebc8 100644 --- a/homeassistant/components/ffmpeg/services.yaml +++ b/homeassistant/components/ffmpeg/services.yaml @@ -1,18 +1,36 @@ restart: + name: Restart description: Send a restart command to a ffmpeg based sensor. fields: entity_id: - description: Name(s) of entities that will restart. Platform dependent. + name: Entity + description: Name of entity that will restart. Platform dependent. example: binary_sensor.ffmpeg_noise + selector: + entity: + integration: ffmpeg + domain: binary_sensor start: + name: Start description: Send a start command to a ffmpeg based sensor. fields: entity_id: - description: Name(s) of entities that will start. Platform dependent. + name: Entity + description: Name of entity that will start. Platform dependent. example: binary_sensor.ffmpeg_noise + selector: + entity: + integration: ffmpeg + domain: binary_sensor stop: + name: Stop description: Send a stop command to a ffmpeg based sensor. fields: entity_id: - description: Name(s) of entities that will stop. Platform dependent. + name: Entity + description: Name of entity that will stop. Platform dependent. example: binary_sensor.ffmpeg_noise + selector: + entity: + integration: ffmpeg + domain: binary_sensor diff --git a/homeassistant/components/filesize/services.yaml b/homeassistant/components/filesize/services.yaml index 9f251b50e7c..a794303f8f1 100644 --- a/homeassistant/components/filesize/services.yaml +++ b/homeassistant/components/filesize/services.yaml @@ -1,2 +1,3 @@ reload: + name: Reload description: Reload all filesize entities. diff --git a/homeassistant/components/filter/services.yaml b/homeassistant/components/filter/services.yaml index 7d64b34a4f7..431c73616ce 100644 --- a/homeassistant/components/filter/services.yaml +++ b/homeassistant/components/filter/services.yaml @@ -1,2 +1,3 @@ reload: + name: Reload description: Reload all filter entities diff --git a/homeassistant/components/flo/services.yaml b/homeassistant/components/flo/services.yaml index b5797020ac0..237fb4a7bf9 100644 --- a/homeassistant/components/flo/services.yaml +++ b/homeassistant/components/flo/services.yaml @@ -1,32 +1,52 @@ # Describes the format for available Flo services set_sleep_mode: + name: Set sleep mode description: Set the location into sleep mode. + target: + entity: + integration: flo + domain: switch fields: - entity_id: - description: Flo switch entity id - example: "switch.shutoff_valve" sleep_minutes: + name: Sleep minutes description: The time to sleep in minutes. + default: true example: 120 + selector: + select: + options: + - '120' + - '1440' + - '4320' revert_to_mode: + name: Revert to mode description: The mode to revert to after sleep_minutes has elapsed. + default: true example: "home" + selector: + select: + options: + - 'away' + - 'home' set_away_mode: + name: Set away mode description: Set the location into away mode. - fields: - entity_id: - description: Flo switch entity id - example: "switch.shutoff_valve" + target: + entity: + integration: flo + domain: switch set_home_mode: + name: Set home mode description: Set the location into home mode. - fields: - entity_id: - description: Flo switch entity id - example: "switch.shutoff_valve" + target: + entity: + integration: flo + domain: switch run_health_test: + name: Run health test description: Have the Flo device run a health test. - fields: - entity_id: - description: Flo switch entity id - example: "switch.shutoff_valve" + target: + entity: + integration: flo + domain: switch diff --git a/homeassistant/components/foscam/services.yaml b/homeassistant/components/foscam/services.yaml index 41563635f68..61326d0e8b6 100644 --- a/homeassistant/components/foscam/services.yaml +++ b/homeassistant/components/foscam/services.yaml @@ -1,22 +1,48 @@ ptz: + name: PTZ description: Pan/Tilt service for Foscam camera. + target: + entity: + integration: foscam + domain: camera fields: - entity_id: - description: Name(s) of entities to move. - example: "camera.living_room_camera" movement: - description: "Direction of the movement. Allowed values: up, down, left, right, top_left, top_right, bottom_left, bottom_right." + description: "Direction of the movement." + required: true example: "up" + selector: + select: + options: + - 'bottom_left' + - 'bottom_right' + - 'down' + - 'left' + - 'right' + - 'top_left' + - 'top_right' + - 'up' travel_time: - description: "(Optional) Travel time in seconds. Allowed values: float from 0 to 1. Default: 0.125" + description: "Travel time in seconds." example: 0.125 + default: 0.125 + selector: + number: + min: 0 + max: 1 + step: 0.005 + unit_of_measurement: seconds ptz_preset: + name: PTZ preset description: PTZ Preset service for Foscam camera. + target: + entity: + integration: foscam + domain: camera fields: - entity_id: - description: Name(s) of entities to move. - example: "camera.living_room_camera" preset_name: - description: "The name of the preset to move to. Presets can be created from within the official Foscam apps." + description: "The name of the preset to move to. Presets can be created from within the official Foscam apps." + required: true example: "TopMost" + selector: + text: diff --git a/homeassistant/components/foursquare/services.yaml b/homeassistant/components/foursquare/services.yaml index 0fcc077c7d3..5e103caeb01 100644 --- a/homeassistant/components/foursquare/services.yaml +++ b/homeassistant/components/foursquare/services.yaml @@ -1,33 +1,52 @@ checkin: + name: Check in description: Check a user into a Foursquare venue. fields: alt: - description: Altitude of the user's location, in meters. [Optional] + name: Altitude + description: Altitude of the user's location, in meters. example: 0 + selector: + text: altAcc: + name: Altitude accuracy description: Vertical accuracy of the user's location, in meters. example: 1 + selector: + text: broadcast: + name: Broadcast description: >- Who to broadcast this check-in to. Accepts a comma-delimited list of values: private (off the grid) or public (share with friends), facebook share on facebook, twitter share on twitter, followers share with followers (celebrity mode users only), If no valid value is found, the default is public. - [Optional] example: "public,twitter" + selector: + text: eventId: - description: The event the user is checking in to. [Optional] + name: Event ID + description: The event the user is checking in to. example: UHR8THISVNT + selector: + text: ll: + name: Latitude/Longitude description: >- Latitude and longitude of the user's location. Only specify this field if you have a GPS or other device reported location for the user - at the time of check-in. [Optional] + at the time of check-in. example: "33.7,44.2" + selector: + text: llAcc: - description: Accuracy of the user's latitude and longitude, in meters. [Optional] + name: Latitude/Longitude accuracy + description: Accuracy of the user's latitude and longitude, in meters. example: 1 + selector: + text: mentions: + name: Mentions description: >- Mentions in your check-in. This parameter is a semicolon-delimited list of mentions. A single mention is of the form "start,end,userid", where @@ -37,9 +56,18 @@ checkin: "fbu-", this indicates a Facebook userid that is being mention. Character indices in shouts are 0-based. [Optional] example: "5,10,HZXXY3Y;15,20,GZYYZ3Z;25,30,fbu-GZXY13Y" + selector: + text: shout: - description: A message about your check-in. The maximum length of this field is 140 characters. [Optional] + name: Shout + description: A message about your check-in. The maximum length of this field is 140 characters. example: There are crayons! Crayons! + selector: + text: venueId: - description: The Foursquare venue where the user is checking in. [Required] + name: Venue ID + description: The Foursquare venue where the user is checking in. + required: true example: IHR8THISVNU + selector: + text: diff --git a/homeassistant/components/freebox/services.yaml b/homeassistant/components/freebox/services.yaml index be7afa60562..7b2a4059434 100644 --- a/homeassistant/components/freebox/services.yaml +++ b/homeassistant/components/freebox/services.yaml @@ -1,5 +1,5 @@ # Freebox service entries description. reboot: - # Description of the service + name: Reboot description: Reboots the Freebox.