forked from home-assistant/core
Add entity category for load sensors to AsusWRT (#58625)
This commit is contained in:
committed by
Paulus Schoutsen
parent
cc9b9a8f95
commit
23841c4b74
@@ -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, ...] = (
|
|||||||
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, ...] = (
|
|||||||
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, ...] = (
|
|||||||
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,
|
||||||
|
Reference in New Issue
Block a user