Skip to content

Commit

Permalink
Fix the order of the sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiteixeira committed Mar 26, 2023
1 parent 427084e commit a03bf90
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions custom_components/proxmoxve/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ class ProxmoxSensorEntityDescription(ProxmoxEntityDescription, SensorEntityDescr
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=2,
suggested_unit_of_measurement=UnitOfInformation.GIGABYTES,
entity_registry_enabled_default=False,
),
ProxmoxSensorEntityDescription(
key="swap_free_perc",
Expand Down Expand Up @@ -280,28 +279,6 @@ class ProxmoxSensorEntityDescription(ProxmoxEntityDescription, SensorEntityDescr
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=1,
),
ProxmoxSensorEntityDescription(
key=ProxmoxKeyAPIParse.NETWORK_IN,
name="Network in",
icon="mdi:download-network-outline",
native_unit_of_measurement=UnitOfInformation.BYTES,
device_class=SensorDeviceClass.DATA_SIZE,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=2,
suggested_unit_of_measurement=UnitOfInformation.MEGABYTES,
entity_registry_enabled_default=False,
),
ProxmoxSensorEntityDescription(
key=ProxmoxKeyAPIParse.NETWORK_OUT,
name="Network out",
icon="mdi:upload-network-outline",
native_unit_of_measurement=UnitOfInformation.BYTES,
device_class=SensorDeviceClass.DATA_SIZE,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=2,
suggested_unit_of_measurement=UnitOfInformation.MEGABYTES,
entity_registry_enabled_default=False,
),
ProxmoxSensorEntityDescription(
key=ProxmoxKeyAPIParse.MEMORY_FREE,
name="Memory free",
Expand All @@ -324,6 +301,7 @@ class ProxmoxSensorEntityDescription(ProxmoxEntityDescription, SensorEntityDescr
else 0,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=1,
entity_registry_enabled_default=False,
),
ProxmoxSensorEntityDescription(
key=ProxmoxKeyAPIParse.MEMORY_TOTAL,
Expand Down Expand Up @@ -359,6 +337,28 @@ class ProxmoxSensorEntityDescription(ProxmoxEntityDescription, SensorEntityDescr
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=1,
),
ProxmoxSensorEntityDescription(
key=ProxmoxKeyAPIParse.NETWORK_IN,
name="Network in",
icon="mdi:download-network-outline",
native_unit_of_measurement=UnitOfInformation.BYTES,
device_class=SensorDeviceClass.DATA_SIZE,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=2,
suggested_unit_of_measurement=UnitOfInformation.MEGABYTES,
entity_registry_enabled_default=False,
),
ProxmoxSensorEntityDescription(
key=ProxmoxKeyAPIParse.NETWORK_OUT,
name="Network out",
icon="mdi:upload-network-outline",
native_unit_of_measurement=UnitOfInformation.BYTES,
device_class=SensorDeviceClass.DATA_SIZE,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=2,
suggested_unit_of_measurement=UnitOfInformation.MEGABYTES,
entity_registry_enabled_default=False,
),
ProxmoxSensorEntityDescription(
key=ProxmoxKeyAPIParse.UPTIME,
name="Uptime",
Expand Down

0 comments on commit a03bf90

Please sign in to comment.