From f0f4e4595c9e23497c39787e300caa1929b517ab Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 5 Dec 2022 12:18:20 +0100 Subject: [PATCH] Migrate Plugwise translations (#83286) --- homeassistant/components/plugwise/select.py | 4 ++-- .../components/plugwise/strings.json | 21 +++++++++++++++++++ .../components/plugwise/strings.select.json | 17 --------------- .../components/plugwise/translations/en.json | 21 +++++++++++++++++++ 4 files changed, 44 insertions(+), 19 deletions(-) delete mode 100644 homeassistant/components/plugwise/strings.select.json diff --git a/homeassistant/components/plugwise/select.py b/homeassistant/components/plugwise/select.py index 73157c6a962..dd36dd69f01 100644 --- a/homeassistant/components/plugwise/select.py +++ b/homeassistant/components/plugwise/select.py @@ -49,20 +49,20 @@ SELECT_TYPES = ( name="Regulation mode", icon="mdi:hvac", entity_category=EntityCategory.CONFIG, + translation_key="regulation_mode", command=lambda api, loc, opt: api.set_regulation_mode(opt), current_option_key="regulation_mode", options_key="regulation_modes", - device_class="plugwise__regulation_mode", ), PlugwiseSelectEntityDescription( key="select_dhw_mode", name="DHW mode", icon="mdi:shower", entity_category=EntityCategory.CONFIG, + translation_key="dhw_mode", command=lambda api, loc, opt: api.set_dhw_mode(opt), current_option_key="dhw_mode", options_key="dhw_modes", - device_class="plugwise__dhw_mode", ), ) diff --git a/homeassistant/components/plugwise/strings.json b/homeassistant/components/plugwise/strings.json index 781a17a1d10..36c200fa000 100644 --- a/homeassistant/components/plugwise/strings.json +++ b/homeassistant/components/plugwise/strings.json @@ -24,5 +24,26 @@ "already_configured": "[%key:common::config_flow::abort::already_configured_service%]", "anna_with_adam": "Both Anna and Adam detected. Add your Adam instead of your Anna" } + }, + "entity": { + "select": { + "dhw_mode": { + "state": { + "off": "Off", + "auto": "Auto", + "boost": "Boost", + "comfort": "Comfort" + } + }, + "regulation_mode": { + "state": { + "bleeding_cold": "Bleeding cold", + "bleeding_hot": "Bleeding hot", + "cooling": "Cooling", + "heating": "Heating", + "off": "Off" + } + } + } } } diff --git a/homeassistant/components/plugwise/strings.select.json b/homeassistant/components/plugwise/strings.select.json deleted file mode 100644 index 92098e3bc35..00000000000 --- a/homeassistant/components/plugwise/strings.select.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "state": { - "plugwise__regulation_mode": { - "bleeding_cold": "Bleeding cold", - "bleeding_hot": "Bleeding hot", - "cooling": "Cooling", - "heating": "Heating", - "off": "Off" - }, - "plugwise__dhw_mode": { - "off": "Off", - "auto": "Auto", - "boost": "Boost", - "comfort": "Comfort" - } - } -} diff --git a/homeassistant/components/plugwise/translations/en.json b/homeassistant/components/plugwise/translations/en.json index ecc5af9218d..92414ac3051 100644 --- a/homeassistant/components/plugwise/translations/en.json +++ b/homeassistant/components/plugwise/translations/en.json @@ -24,5 +24,26 @@ "title": "Connect to the Smile" } } + }, + "entity": { + "select": { + "dhw_mode": { + "state": { + "auto": "Auto", + "boost": "Boost", + "comfort": "Comfort", + "off": "Off" + } + }, + "regulation_mode": { + "state": { + "bleeding_cold": "Bleeding cold", + "bleeding_hot": "Bleeding hot", + "cooling": "Cooling", + "heating": "Heating", + "off": "Off" + } + } + } } } \ No newline at end of file