From 388761922bde9042d8598573339a2c3797e157ed Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Wed, 20 Oct 2021 15:58:09 -0600 Subject: [PATCH] Add entity categories for appropriate Guardian entities (#58104) --- homeassistant/components/guardian/binary_sensor.py | 3 +++ homeassistant/components/guardian/sensor.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/homeassistant/components/guardian/binary_sensor.py b/homeassistant/components/guardian/binary_sensor.py index b420605a0ec..7db91d41885 100644 --- a/homeassistant/components/guardian/binary_sensor.py +++ b/homeassistant/components/guardian/binary_sensor.py @@ -9,6 +9,7 @@ from homeassistant.components.binary_sensor import ( BinarySensorEntityDescription, ) from homeassistant.config_entries import ConfigEntry +from homeassistant.const import ENTITY_CATEGORY_DIAGNOSTIC from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -36,6 +37,7 @@ SENSOR_DESCRIPTION_AP_ENABLED = BinarySensorEntityDescription( key=SENSOR_KIND_AP_INFO, name="Onboard AP Enabled", device_class=DEVICE_CLASS_CONNECTIVITY, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ) SENSOR_DESCRIPTION_LEAK_DETECTED = BinarySensorEntityDescription( key=SENSOR_KIND_LEAK_DETECTED, @@ -46,6 +48,7 @@ SENSOR_DESCRIPTION_MOVED = BinarySensorEntityDescription( key=SENSOR_KIND_MOVED, name="Recently Moved", device_class=DEVICE_CLASS_MOVING, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ) PAIRED_SENSOR_DESCRIPTIONS = ( diff --git a/homeassistant/components/guardian/sensor.py b/homeassistant/components/guardian/sensor.py index 16b05e20767..3a014d5cbf4 100644 --- a/homeassistant/components/guardian/sensor.py +++ b/homeassistant/components/guardian/sensor.py @@ -10,6 +10,7 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_TEMPERATURE, + ENTITY_CATEGORY_DIAGNOSTIC, PERCENTAGE, TEMP_FAHRENHEIT, TIME_MINUTES, @@ -38,6 +39,7 @@ SENSOR_DESCRIPTION_BATTERY = SensorEntityDescription( key=SENSOR_KIND_BATTERY, name="Battery", device_class=DEVICE_CLASS_BATTERY, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, native_unit_of_measurement=PERCENTAGE, ) SENSOR_DESCRIPTION_TEMPERATURE = SensorEntityDescription( @@ -51,6 +53,7 @@ SENSOR_DESCRIPTION_UPTIME = SensorEntityDescription( key=SENSOR_KIND_UPTIME, name="Uptime", icon="mdi:timer", + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, native_unit_of_measurement=TIME_MINUTES, )