From cbddade4bf38b57d5e0b72717ebadcfb982173a3 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 12 Jul 2023 13:44:15 +0200 Subject: [PATCH] Migrate logbook services to support translations (#96341) Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- .../components/logbook/services.yaml | 10 ------- homeassistant/components/logbook/strings.json | 26 +++++++++++++++++++ 2 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 homeassistant/components/logbook/strings.json diff --git a/homeassistant/components/logbook/services.yaml b/homeassistant/components/logbook/services.yaml index 3f688628032..c6722dad10b 100644 --- a/homeassistant/components/logbook/services.yaml +++ b/homeassistant/components/logbook/services.yaml @@ -1,29 +1,19 @@ log: - name: Log - description: Create a custom entry in your logbook. fields: name: - name: Name - description: Custom name for an entity, can be referenced with entity_id. required: true example: "Kitchen" selector: text: message: - name: Message - description: Message of the custom logbook entry. required: true example: "is being used" selector: text: entity_id: - name: Entity ID - description: Entity to reference in custom logbook entry. selector: entity: domain: - name: Domain - description: Icon of domain to display in custom logbook entry. example: "light" selector: text: diff --git a/homeassistant/components/logbook/strings.json b/homeassistant/components/logbook/strings.json new file mode 100644 index 00000000000..10ebcc68f64 --- /dev/null +++ b/homeassistant/components/logbook/strings.json @@ -0,0 +1,26 @@ +{ + "services": { + "log": { + "name": "Log", + "description": "Creates a custom entry in the logbook.", + "fields": { + "name": { + "name": "Name", + "description": "Custom name for an entity, can be referenced using an `entity_id`." + }, + "message": { + "name": "Message", + "description": "Message of the logbook entry." + }, + "entity_id": { + "name": "Entity ID", + "description": "Entity to reference in the logbook entry." + }, + "domain": { + "name": "Domain", + "description": "Determines which icon is used in the logbook entry. The icon illustrates the integration domain related to this logbook entry." + } + } + } + } +}