From 426a1511d5fb1c9a387aedcd11c3ffd708fb2799 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Sun, 7 Jan 2024 23:14:38 +0100 Subject: [PATCH] Mark Ring battery and signal strength sensors as diagnostic (#107503) --- homeassistant/components/ring/sensor.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/ring/sensor.py b/homeassistant/components/ring/sensor.py index a596d413ac7..0ed24f45cbd 100644 --- a/homeassistant/components/ring/sensor.py +++ b/homeassistant/components/ring/sensor.py @@ -10,7 +10,11 @@ from homeassistant.components.sensor import ( SensorEntityDescription, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.const import PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT +from homeassistant.const import ( + PERCENTAGE, + SIGNAL_STRENGTH_DECIBELS_MILLIWATT, + EntityCategory, +) from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -194,6 +198,7 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = ( category=["doorbots", "authorized_doorbots", "stickup_cams"], native_unit_of_measurement=PERCENTAGE, device_class=SensorDeviceClass.BATTERY, + entity_category=EntityCategory.DIAGNOSTIC, cls=RingSensor, ), RingSensorEntityDescription( @@ -234,6 +239,7 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = ( translation_key="wifi_signal_category", category=["chimes", "doorbots", "authorized_doorbots", "stickup_cams"], icon="mdi:wifi", + entity_category=EntityCategory.DIAGNOSTIC, cls=HealthDataRingSensor, ), RingSensorEntityDescription( @@ -243,6 +249,7 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = ( native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, icon="mdi:wifi", device_class=SensorDeviceClass.SIGNAL_STRENGTH, + entity_category=EntityCategory.DIAGNOSTIC, cls=HealthDataRingSensor, ), )