From d0258c8fc8cf43050ae2c37e4ab4bd3f95615356 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 12 Jul 2023 12:53:24 +0200 Subject: [PATCH] Migrate switch services to support translations (#96405) --- homeassistant/components/switch/services.yaml | 6 ------ homeassistant/components/switch/strings.json | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/switch/services.yaml b/homeassistant/components/switch/services.yaml index 33f66070bfb..5da203d8a80 100644 --- a/homeassistant/components/switch/services.yaml +++ b/homeassistant/components/switch/services.yaml @@ -1,22 +1,16 @@ # Describes the format for available switch services turn_on: - name: Turn on - description: Turn a switch on target: entity: domain: switch turn_off: - name: Turn off - description: Turn a switch off target: entity: domain: switch toggle: - name: Toggle - description: Toggles a switch state target: entity: domain: switch diff --git a/homeassistant/components/switch/strings.json b/homeassistant/components/switch/strings.json index 70cd45f4d21..ae5a3165cd9 100644 --- a/homeassistant/components/switch/strings.json +++ b/homeassistant/components/switch/strings.json @@ -30,5 +30,19 @@ "outlet": { "name": "Outlet" } + }, + "services": { + "turn_on": { + "name": "Turn on", + "description": "Turns a switch on." + }, + "turn_off": { + "name": "Turn off", + "description": "Turns a switch off." + }, + "toggle": { + "name": "Toggle", + "description": "Toggles a switch on/off." + } } }