From 1a261f7802d4d5f0d31b2f265efb0d333496e986 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 24 Oct 2021 20:56:51 -1000 Subject: [PATCH] Add entity category to roomba (#58362) --- homeassistant/components/roomba/sensor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/roomba/sensor.py b/homeassistant/components/roomba/sensor.py index bc20b4397e2..4552159677c 100644 --- a/homeassistant/components/roomba/sensor.py +++ b/homeassistant/components/roomba/sensor.py @@ -1,7 +1,11 @@ """Sensor for checking the battery level of Roomba.""" from homeassistant.components.sensor import SensorEntity from homeassistant.components.vacuum import STATE_DOCKED -from homeassistant.const import DEVICE_CLASS_BATTERY, PERCENTAGE +from homeassistant.const import ( + DEVICE_CLASS_BATTERY, + ENTITY_CATEGORY_DIAGNOSTIC, + PERCENTAGE, +) from homeassistant.helpers.icon import icon_for_battery_level from .const import BLID, DOMAIN, ROOMBA_SESSION @@ -20,6 +24,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities): class RoombaBattery(IRobotEntity, SensorEntity): """Class to hold Roomba Sensor basic info.""" + _attr_entity_category = ENTITY_CATEGORY_DIAGNOSTIC + @property def name(self): """Return the name of the sensor."""