From 11cd7692a13daba35d8eab3745b6d7a0997e4896 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 12 Jul 2023 19:58:08 +0200 Subject: [PATCH] Migrate group services to support translations (#96369) Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Co-authored-by: Joost Lekkerkerker --- homeassistant/components/group/services.yaml | 23 --------- homeassistant/components/group/strings.json | 50 ++++++++++++++++++++ 2 files changed, 50 insertions(+), 23 deletions(-) diff --git a/homeassistant/components/group/services.yaml b/homeassistant/components/group/services.yaml index fdb1a1af014..e5ac921cc77 100644 --- a/homeassistant/components/group/services.yaml +++ b/homeassistant/components/group/services.yaml @@ -1,62 +1,39 @@ # Describes the format for available group services reload: - name: Reload - description: Reload group configuration, entities, and notify services. - set: - name: Set - description: Create/Update a user group. fields: object_id: - name: Object ID - description: Group id and part of entity id. required: true example: "test_group" selector: text: name: - name: Name - description: Name of group example: "My test group" selector: text: icon: - name: Icon - description: Name of icon for the group. example: "mdi:camera" selector: icon: entities: - name: Entities - description: List of all members in the group. Not compatible with 'delta'. example: domain.entity_id1, domain.entity_id2 selector: object: add_entities: - name: Add Entities - description: List of members that will change on group listening. example: domain.entity_id1, domain.entity_id2 selector: object: remove_entities: - name: Remove Entities - description: List of members that will be removed from group listening. example: domain.entity_id1, domain.entity_id2 selector: object: all: - name: All - description: Enable this option if the group should only turn on when all entities are on. selector: boolean: remove: - name: Remove - description: Remove a user group. fields: object_id: - name: Object ID - description: Group id and part of entity id. required: true example: "test_group" selector: diff --git a/homeassistant/components/group/strings.json b/homeassistant/components/group/strings.json index 192823cef65..7b49eaf4186 100644 --- a/homeassistant/components/group/strings.json +++ b/homeassistant/components/group/strings.json @@ -190,5 +190,55 @@ "product": "Product" } } + }, + "services": { + "reload": { + "name": "Reload", + "description": "Reloads group configuration, entities, and notify services from YAML-configuration." + }, + "set": { + "name": "Set", + "description": "Creates/Updates a user group.", + "fields": { + "object_id": { + "name": "Object ID", + "description": "Object ID of this group. This object ID is used as part of the entity ID. Entity ID format: [domain].[object_id]." + }, + "name": { + "name": "Name", + "description": "Name of the group." + }, + "icon": { + "name": "Icon", + "description": "Name of the icon for the group." + }, + "entities": { + "name": "Entities", + "description": "List of all members in the group. Cannot be used in combination with `Add entities` or `Remove entities`." + }, + "add_entities": { + "name": "Add entities", + "description": "List of members to be added to the group. Cannot be used in combination with `Entities` or `Remove entities`." + }, + "remove_entities": { + "name": "Remove entities", + "description": "List of members to be removed from a group. Cannot be used in combination with `Entities` or `Add entities`." + }, + "all": { + "name": "All", + "description": "Enable this option if the group should only be used when all entities are in state `on`." + } + } + }, + "remove": { + "name": "Remove", + "description": "Removes a group.", + "fields": { + "object_id": { + "name": "Object ID", + "description": "Object ID of this group. This object ID is used as part of the entity ID. Entity ID format: [domain].[object_id]." + } + } + } } }