From b5ff0b4ec2c304bdcaa13609235f95340c246460 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 29 Aug 2023 08:47:35 +0200 Subject: [PATCH] Add entity translations to Vilfo (#99019) --- homeassistant/components/vilfo/sensor.py | 4 ++-- homeassistant/components/vilfo/strings.json | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/vilfo/sensor.py b/homeassistant/components/vilfo/sensor.py index ad2779ed521..511e25bbfba 100644 --- a/homeassistant/components/vilfo/sensor.py +++ b/homeassistant/components/vilfo/sensor.py @@ -39,14 +39,14 @@ class VilfoSensorEntityDescription(SensorEntityDescription, VilfoRequiredKeysMix SENSOR_TYPES: tuple[VilfoSensorEntityDescription, ...] = ( VilfoSensorEntityDescription( key=ATTR_LOAD, - name="Load", + translation_key=ATTR_LOAD, native_unit_of_measurement=PERCENTAGE, icon="mdi:memory", api_key=ATTR_API_DATA_FIELD_LOAD, ), VilfoSensorEntityDescription( key=ATTR_BOOT_TIME, - name="Boot time", + translation_key=ATTR_BOOT_TIME, icon="mdi:timer-outline", api_key=ATTR_API_DATA_FIELD_BOOT_TIME, device_class=SensorDeviceClass.TIMESTAMP, diff --git a/homeassistant/components/vilfo/strings.json b/homeassistant/components/vilfo/strings.json index 6577c99456c..d559e3a6716 100644 --- a/homeassistant/components/vilfo/strings.json +++ b/homeassistant/components/vilfo/strings.json @@ -16,5 +16,15 @@ "abort": { "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" } + }, + "entity": { + "sensor": { + "load": { + "name": "Load" + }, + "boot_time": { + "name": "Boot time" + } + } } }