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

This commit is contained in:
Chen-IL
2021-10-28 22:34:26 +03:00
committed by Paulus Schoutsen
parent cc9b9a8f95
commit 23841c4b74

View File

@@ -11,7 +11,11 @@ from homeassistant.components.sensor import (
SensorEntityDescription,
)
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.helpers.update_coordinator import (
CoordinatorEntity,
@@ -89,6 +93,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
name="Load Avg (1m)",
icon="mdi:cpu-32-bit",
state_class=STATE_CLASS_MEASUREMENT,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
entity_registry_enabled_default=False,
factor=1,
precision=1,
@@ -98,6 +103,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
name="Load Avg (5m)",
icon="mdi:cpu-32-bit",
state_class=STATE_CLASS_MEASUREMENT,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
entity_registry_enabled_default=False,
factor=1,
precision=1,
@@ -107,6 +113,7 @@ CONNECTION_SENSORS: tuple[AsusWrtSensorEntityDescription, ...] = (
name="Load Avg (15m)",
icon="mdi:cpu-32-bit",
state_class=STATE_CLASS_MEASUREMENT,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
entity_registry_enabled_default=False,
factor=1,
precision=1,