Skip to content
Snippets Groups Projects
Unverified Commit e32fdfec authored by Chen-IL's avatar Chen-IL Committed by GitHub
Browse files

Add entity category for load sensors to AsusWRT (#58625)

parent 9f30cd78
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,11 @@ from homeassistant.components.sensor import ( ...@@ -11,7 +11,11 @@ from homeassistant.components.sensor import (
SensorEntityDescription, SensorEntityDescription,
) )
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import DATA_GIGABYTES, DATA_RATE_MEGABITS_PER_SECOND from homeassistant.const import (
DATA_GIGABYTES,
DATA_RATE_MEGABITS_PER_SECOND,
ENTITY_CATEGORY_DIAGNOSTIC,
)
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import ( from homeassistant.helpers.update_coordinator import (
CoordinatorEntity, CoordinatorEntity,
...@@ -89,6 +93,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = ( ...@@ -89,6 +93,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
name="Load Avg (1m)", name="Load Avg (1m)",
icon="mdi:cpu-32-bit", icon="mdi:cpu-32-bit",
state_class=STATE_CLASS_MEASUREMENT, state_class=STATE_CLASS_MEASUREMENT,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
entity_registry_enabled_default=False, entity_registry_enabled_default=False,
factor=1, factor=1,
precision=1, precision=1,
...@@ -98,6 +103,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = ( ...@@ -98,6 +103,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
name="Load Avg (5m)", name="Load Avg (5m)",
icon="mdi:cpu-32-bit", icon="mdi:cpu-32-bit",
state_class=STATE_CLASS_MEASUREMENT, state_class=STATE_CLASS_MEASUREMENT,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
entity_registry_enabled_default=False, entity_registry_enabled_default=False,
factor=1, factor=1,
precision=1, precision=1,
...@@ -107,6 +113,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = ( ...@@ -107,6 +113,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
name="Load Avg (15m)", name="Load Avg (15m)",
icon="mdi:cpu-32-bit", icon="mdi:cpu-32-bit",
state_class=STATE_CLASS_MEASUREMENT, state_class=STATE_CLASS_MEASUREMENT,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
entity_registry_enabled_default=False, entity_registry_enabled_default=False,
factor=1, factor=1,
precision=1, precision=1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment