diff --git a/homeassistant/components/yolink/sensor.py b/homeassistant/components/yolink/sensor.py index cf7cd2a16d9b..d6f0c620c7fb 100644 --- a/homeassistant/components/yolink/sensor.py +++ b/homeassistant/components/yolink/sensor.py @@ -212,6 +212,7 @@ SENSOR_TYPES: tuple[YoLinkSensorEntityDescription, ...] = ( key="battery", device_class=SensorDeviceClass.BATTERY, native_unit_of_measurement=PERCENTAGE, + entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, exists_fn=lambda device: device.device_type in BATTERY_POWER_SENSOR, should_update_entity=lambda value: value is not None, @@ -251,9 +252,11 @@ SENSOR_TYPES: tuple[YoLinkSensorEntityDescription, ...] = ( # mcu temperature YoLinkSensorEntityDescription( key="devTemperature", + translation_key="device_temperature", device_class=SensorDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, state_class=SensorStateClass.MEASUREMENT, + entity_category=EntityCategory.DIAGNOSTIC, exists_fn=lambda device: device.device_type in MCU_DEV_TEMPERATURE_SENSOR, should_update_entity=lambda value: value is not None, value=lambda device, data: data.get("devTemperature"), diff --git a/homeassistant/components/yolink/strings.json b/homeassistant/components/yolink/strings.json index ee6d6c23c417..449a5a7028b4 100644 --- a/homeassistant/components/yolink/strings.json +++ b/homeassistant/components/yolink/strings.json @@ -67,6 +67,9 @@ "current_power": { "name": "Current power" }, + "device_temperature": { + "name": "Device temperature" + }, "power_consumption": { "name": "Power consumption" },