From 8b69608242774a4dbeeb6024974acae0e1e8e415 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 18 Feb 2021 17:06:25 +0100 Subject: [PATCH] Add selectors to Browser, Recorder, Shopping List service definitions (#46749) --- .../components/browser/services.yaml | 7 ++++++- .../components/recorder/services.yaml | 20 ++++++++++++++++--- .../components/shopping_list/services.yaml | 15 +++++++++++--- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/browser/services.yaml b/homeassistant/components/browser/services.yaml index 460def22dc1..f6c5e7c90e1 100644 --- a/homeassistant/components/browser/services.yaml +++ b/homeassistant/components/browser/services.yaml @@ -1,6 +1,11 @@ browse_url: - description: Open a URL in the default browser on the host machine of Home Assistant. + description: + Open a URL in the default browser on the host machine of Home Assistant fields: url: + name: URL description: The URL to open. + required: true example: "https://www.home-assistant.io" + selector: + text: diff --git a/homeassistant/components/recorder/services.yaml b/homeassistant/components/recorder/services.yaml index 512807c9f69..cad1925080f 100644 --- a/homeassistant/components/recorder/services.yaml +++ b/homeassistant/components/recorder/services.yaml @@ -1,11 +1,25 @@ # Describes the format for available recorder services purge: - description: Start purge task - delete events and states older than x days, according to keep_days service data. + description: Start purge task - to clean up old data from your database fields: keep_days: - description: Number of history days to keep in database after purge. Value >= 0. + name: Days to keep + description: Number of history days to keep in database after purge. example: 2 + selector: + number: + min: 0 + max: 365 + step: 1 + unit_of_measurement: days + mode: slider + repack: - description: Attempt to save disk space by rewriting the entire database file. + name: Repack + description: + Attempt to save disk space by rewriting the entire database file. example: true + default: false + selector: + boolean: diff --git a/homeassistant/components/shopping_list/services.yaml b/homeassistant/components/shopping_list/services.yaml index 04457e2abec..961fb867aa7 100644 --- a/homeassistant/components/shopping_list/services.yaml +++ b/homeassistant/components/shopping_list/services.yaml @@ -1,12 +1,21 @@ add_item: - description: Adds an item to the shopping list. + description: Adds an item to the shopping list fields: name: + name: Name description: The name of the item to add. + required: true example: Beer + selector: + text: + complete_item: - description: Marks an item as completed in the shopping list. It does not remove the item. + description: Marks an item as completed in the shopping list. fields: name: - description: The name of the item to mark as completed. + name: Name + description: The name of the item to mark as completed (without removing). + required: true example: Beer + selector: + text: