1
mirror of https://github.com/home-assistant/core synced 2024-07-15 09:42:11 +02:00

Mark Ring battery and signal strength sensors as diagnostic (#107503)

This commit is contained in:
Joost Lekkerkerker 2024-01-07 23:14:38 +01:00 committed by GitHub
parent 810c6ea5ae
commit 426a1511d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
),
)