From 64145d6ccf425e9c8c405a8332a1f5fb331d8894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hjelseth=20H=C3=B8yer?= Date: Sun, 17 Oct 2021 19:27:03 +0200 Subject: [PATCH] Add category diagnostic to Switchbot battery and signal sensor (#57854) --- homeassistant/components/switchbot/sensor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/switchbot/sensor.py b/homeassistant/components/switchbot/sensor.py index 78b078c26b4..0a0c4b265ec 100644 --- a/homeassistant/components/switchbot/sensor.py +++ b/homeassistant/components/switchbot/sensor.py @@ -9,6 +9,7 @@ from homeassistant.const import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_SIGNAL_STRENGTH, + ENTITY_CATEGORY_DIAGNOSTIC, PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT, ) @@ -27,11 +28,13 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = { native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, device_class=DEVICE_CLASS_SIGNAL_STRENGTH, entity_registry_enabled_default=False, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), "battery": SensorEntityDescription( key="battery", native_unit_of_measurement=PERCENTAGE, device_class=DEVICE_CLASS_BATTERY, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), "lightLevel": SensorEntityDescription( key="lightLevel",