mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Fix QNAP Sensor Entity Descriptions (#94749)
This commit is contained in:
parent
c4284c07b6
commit
71e8ee52e5
@ -8,6 +8,7 @@ from homeassistant.components.sensor import (
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_NAME,
|
||||
@ -70,6 +71,8 @@ _SYSTEM_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
name="System Temperature",
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
)
|
||||
_CPU_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
@ -78,12 +81,16 @@ _CPU_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
name="CPU Temperature",
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
icon="mdi:checkbox-marked-circle-outline",
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="cpu_usage",
|
||||
name="CPU Usage",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:chip",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
)
|
||||
_MEMORY_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
@ -93,6 +100,8 @@ _MEMORY_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
native_unit_of_measurement=UnitOfInformation.GIBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:memory",
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="memory_used",
|
||||
@ -100,12 +109,15 @@ _MEMORY_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
native_unit_of_measurement=UnitOfInformation.GIBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:memory",
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="memory_percent_used",
|
||||
name="Memory Usage",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:memory",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
)
|
||||
_NETWORK_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
@ -120,6 +132,8 @@ _NETWORK_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
native_unit_of_measurement=UnitOfDataRate.MEBIBYTES_PER_SECOND,
|
||||
device_class=SensorDeviceClass.DATA_RATE,
|
||||
icon="mdi:upload",
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="network_rx",
|
||||
@ -127,6 +141,8 @@ _NETWORK_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
native_unit_of_measurement=UnitOfDataRate.MEBIBYTES_PER_SECOND,
|
||||
device_class=SensorDeviceClass.DATA_RATE,
|
||||
icon="mdi:download",
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
)
|
||||
_DRIVE_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
@ -134,12 +150,16 @@ _DRIVE_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
key="drive_smart_status",
|
||||
name="SMART Status",
|
||||
icon="mdi:checkbox-marked-circle-outline",
|
||||
entity_registry_enabled_default=False,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="drive_temp",
|
||||
name="Temperature",
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
icon="mdi:thermometer",
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
)
|
||||
_VOLUME_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
@ -149,6 +169,8 @@ _VOLUME_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
native_unit_of_measurement=UnitOfInformation.GIBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:chart-pie",
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="volume_size_free",
|
||||
@ -156,12 +178,15 @@ _VOLUME_MON_COND: tuple[SensorEntityDescription, ...] = (
|
||||
native_unit_of_measurement=UnitOfInformation.GIBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:chart-pie",
|
||||
entity_registry_enabled_default=False,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="volume_percentage_used",
|
||||
name="Volume Used",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:chart-pie",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user