diff --git a/homeassistant/components/lametric/select.py b/homeassistant/components/lametric/select.py index e15e33facfc..79e3eca693f 100644 --- a/homeassistant/components/lametric/select.py +++ b/homeassistant/components/lametric/select.py @@ -40,8 +40,8 @@ SELECTS = [ name="Brightness mode", icon="mdi:brightness-auto", entity_category=EntityCategory.CONFIG, - device_class="lametric__brightness_mode", options=["auto", "manual"], + translation_key="brightness_mode", current_fn=lambda device: device.display.brightness_mode.value, select_fn=lambda api, opt: api.display(brightness_mode=BrightnessMode(opt)), ), diff --git a/homeassistant/components/lametric/strings.json b/homeassistant/components/lametric/strings.json index 768f8e2b740..ff207bd864a 100644 --- a/homeassistant/components/lametric/strings.json +++ b/homeassistant/components/lametric/strings.json @@ -49,5 +49,15 @@ "title": "Manual migration required for LaMetric", "description": "The LaMetric integration has been modernized: It is now configured and set up via the user interface and the communcations are now local.\n\nUnfortunately, there is no automatic migration path possible and thus requires you to re-setup your LaMetric with Home Assistant. Please consult the Home Assistant LaMetric integration documentation on how to set it up.\n\nRemove the old LaMetric YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue." } + }, + "entity": { + "select": { + "brightness_mode": { + "state": { + "auto": "Automatic", + "manual": "Manual" + } + } + } } } diff --git a/homeassistant/components/lametric/strings.select.json b/homeassistant/components/lametric/strings.select.json deleted file mode 100644 index 1d2ce0a2ce7..00000000000 --- a/homeassistant/components/lametric/strings.select.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "state": { - "lametric__brightness_mode": { - "auto": "Automatic", - "manual": "Manual" - } - } -} diff --git a/homeassistant/components/lametric/translations/en.json b/homeassistant/components/lametric/translations/en.json index c36b490fcd2..525ff400015 100644 --- a/homeassistant/components/lametric/translations/en.json +++ b/homeassistant/components/lametric/translations/en.json @@ -44,6 +44,16 @@ } } }, + "entity": { + "select": { + "brightness_mode": { + "state": { + "auto": "Automatic", + "manual": "Manual" + } + } + } + }, "issues": { "manual_migration": { "description": "The LaMetric integration has been modernized: It is now configured and set up via the user interface and the communcations are now local.\n\nUnfortunately, there is no automatic migration path possible and thus requires you to re-setup your LaMetric with Home Assistant. Please consult the Home Assistant LaMetric integration documentation on how to set it up.\n\nRemove the old LaMetric YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.",