Add icon translations to Glances (#111615)
* Add icon translations to Glances * Add icon translations to Glancespull/111709/head
parent
132b597d9e
commit
3077039470
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"disk_usage": {
|
||||
"default": "mdi:harddisk"
|
||||
},
|
||||
"disk_used": {
|
||||
"default": "mdi:harddisk"
|
||||
},
|
||||
"disk_free": {
|
||||
"default": "mdi:harddisk"
|
||||
},
|
||||
"memory_usage": {
|
||||
"default": "mdi:memory"
|
||||
},
|
||||
"memory_use": {
|
||||
"default": "mdi:memory"
|
||||
},
|
||||
"memory_free": {
|
||||
"default": "mdi:memory"
|
||||
},
|
||||
"swap_usage": {
|
||||
"default": "mdi:memory"
|
||||
},
|
||||
"swap_use": {
|
||||
"default": "mdi:memory"
|
||||
},
|
||||
"swap_free": {
|
||||
"default": "mdi:memory"
|
||||
},
|
||||
"fan_speed": {
|
||||
"default": "mdi:fan"
|
||||
},
|
||||
"container_active": {
|
||||
"default": "mdi:docker"
|
||||
},
|
||||
"container_cpu_usage": {
|
||||
"default": "mdi:docker"
|
||||
},
|
||||
"container_memory_used": {
|
||||
"default": "mdi:docker"
|
||||
},
|
||||
"raid_available": {
|
||||
"default": "mdi:harddisk"
|
||||
},
|
||||
"raid_used": {
|
||||
"default": "mdi:harddisk"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -47,7 +47,6 @@ SENSOR_TYPES = {
|
|||
type="fs",
|
||||
translation_key="disk_usage",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:harddisk",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("fs", "disk_use"): GlancesSensorEntityDescription(
|
||||
|
@ -56,7 +55,6 @@ SENSOR_TYPES = {
|
|||
translation_key="disk_used",
|
||||
native_unit_of_measurement=UnitOfInformation.GIBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:harddisk",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("fs", "disk_free"): GlancesSensorEntityDescription(
|
||||
|
@ -65,7 +63,6 @@ SENSOR_TYPES = {
|
|||
translation_key="disk_free",
|
||||
native_unit_of_measurement=UnitOfInformation.GIBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:harddisk",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("mem", "memory_use_percent"): GlancesSensorEntityDescription(
|
||||
|
@ -73,7 +70,6 @@ SENSOR_TYPES = {
|
|||
type="mem",
|
||||
translation_key="memory_usage",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:memory",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("mem", "memory_use"): GlancesSensorEntityDescription(
|
||||
|
@ -82,7 +78,6 @@ SENSOR_TYPES = {
|
|||
translation_key="memory_use",
|
||||
native_unit_of_measurement=UnitOfInformation.MEBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:memory",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("mem", "memory_free"): GlancesSensorEntityDescription(
|
||||
|
@ -91,7 +86,6 @@ SENSOR_TYPES = {
|
|||
translation_key="memory_free",
|
||||
native_unit_of_measurement=UnitOfInformation.MEBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:memory",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("memswap", "swap_use_percent"): GlancesSensorEntityDescription(
|
||||
|
@ -99,7 +93,6 @@ SENSOR_TYPES = {
|
|||
type="memswap",
|
||||
translation_key="swap_usage",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:memory",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("memswap", "swap_use"): GlancesSensorEntityDescription(
|
||||
|
@ -108,7 +101,6 @@ SENSOR_TYPES = {
|
|||
translation_key="swap_use",
|
||||
native_unit_of_measurement=UnitOfInformation.GIBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:memory",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("memswap", "swap_free"): GlancesSensorEntityDescription(
|
||||
|
@ -117,7 +109,6 @@ SENSOR_TYPES = {
|
|||
translation_key="swap_free",
|
||||
native_unit_of_measurement=UnitOfInformation.GIBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:memory",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("load", "processor_load"): GlancesSensorEntityDescription(
|
||||
|
@ -184,7 +175,6 @@ SENSOR_TYPES = {
|
|||
type="sensors",
|
||||
translation_key="fan_speed",
|
||||
native_unit_of_measurement=REVOLUTIONS_PER_MINUTE,
|
||||
icon="mdi:fan",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("sensors", "battery"): GlancesSensorEntityDescription(
|
||||
|
@ -193,14 +183,12 @@ SENSOR_TYPES = {
|
|||
translation_key="charge",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
device_class=SensorDeviceClass.BATTERY,
|
||||
icon="mdi:battery",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("docker", "docker_active"): GlancesSensorEntityDescription(
|
||||
key="docker_active",
|
||||
type="docker",
|
||||
translation_key="container_active",
|
||||
icon="mdi:docker",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("docker", "docker_cpu_use"): GlancesSensorEntityDescription(
|
||||
|
@ -208,7 +196,6 @@ SENSOR_TYPES = {
|
|||
type="docker",
|
||||
translation_key="container_cpu_usage",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:docker",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("docker", "docker_memory_use"): GlancesSensorEntityDescription(
|
||||
|
@ -217,21 +204,18 @@ SENSOR_TYPES = {
|
|||
translation_key="container_memory_used",
|
||||
native_unit_of_measurement=UnitOfInformation.MEBIBYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
icon="mdi:docker",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("raid", "available"): GlancesSensorEntityDescription(
|
||||
key="available",
|
||||
type="raid",
|
||||
translation_key="raid_available",
|
||||
icon="mdi:harddisk",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
("raid", "used"): GlancesSensorEntityDescription(
|
||||
key="used",
|
||||
type="raid",
|
||||
translation_key="raid_used",
|
||||
icon="mdi:harddisk",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:docker',
|
||||
'original_icon': None,
|
||||
'original_name': 'Containers active',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -38,7 +38,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': '0.0.0.0 Containers active',
|
||||
'icon': 'mdi:docker',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
|
@ -73,7 +72,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:docker',
|
||||
'original_icon': None,
|
||||
'original_name': 'Containers CPU usage',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -87,7 +86,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': '0.0.0.0 Containers CPU usage',
|
||||
'icon': 'mdi:docker',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
|
@ -123,7 +121,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DATA_SIZE: 'data_size'>,
|
||||
'original_icon': 'mdi:docker',
|
||||
'original_icon': None,
|
||||
'original_name': 'Containers memory used',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -138,7 +136,6 @@
|
|||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'data_size',
|
||||
'friendly_name': '0.0.0.0 Containers memory used',
|
||||
'icon': 'mdi:docker',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfInformation.MEBIBYTES: 'MiB'>,
|
||||
}),
|
||||
|
@ -274,7 +271,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': 'md1 available',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -288,7 +285,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': '0.0.0.0 md1 available',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
|
@ -323,7 +319,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': 'md1 used',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -337,7 +333,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': '0.0.0.0 md1 used',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
|
@ -372,7 +367,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': 'md3 available',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -386,7 +381,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': '0.0.0.0 md3 available',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
|
@ -421,7 +415,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': 'md3 used',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -435,7 +429,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': '0.0.0.0 md3 used',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
|
@ -470,7 +463,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DATA_SIZE: 'data_size'>,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': '/media disk free',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -485,7 +478,6 @@
|
|||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'data_size',
|
||||
'friendly_name': '0.0.0.0 /media disk free',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfInformation.GIBIBYTES: 'GiB'>,
|
||||
}),
|
||||
|
@ -521,7 +513,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': '/media disk usage',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -535,7 +527,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': '0.0.0.0 /media disk usage',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
|
@ -571,7 +562,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DATA_SIZE: 'data_size'>,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': '/media disk used',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -586,7 +577,6 @@
|
|||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'data_size',
|
||||
'friendly_name': '0.0.0.0 /media disk used',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfInformation.GIBIBYTES: 'GiB'>,
|
||||
}),
|
||||
|
@ -622,7 +612,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DATA_SIZE: 'data_size'>,
|
||||
'original_icon': 'mdi:memory',
|
||||
'original_icon': None,
|
||||
'original_name': 'Memory free',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -637,7 +627,6 @@
|
|||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'data_size',
|
||||
'friendly_name': '0.0.0.0 Memory free',
|
||||
'icon': 'mdi:memory',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfInformation.MEBIBYTES: 'MiB'>,
|
||||
}),
|
||||
|
@ -673,7 +662,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:memory',
|
||||
'original_icon': None,
|
||||
'original_name': 'Memory usage',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -687,7 +676,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': '0.0.0.0 Memory usage',
|
||||
'icon': 'mdi:memory',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
|
@ -723,7 +711,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DATA_SIZE: 'data_size'>,
|
||||
'original_icon': 'mdi:memory',
|
||||
'original_icon': None,
|
||||
'original_name': 'Memory use',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -738,7 +726,6 @@
|
|||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'data_size',
|
||||
'friendly_name': '0.0.0.0 Memory use',
|
||||
'icon': 'mdi:memory',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfInformation.MEBIBYTES: 'MiB'>,
|
||||
}),
|
||||
|
@ -824,7 +811,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DATA_SIZE: 'data_size'>,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': '/ssl disk free',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -839,7 +826,6 @@
|
|||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'data_size',
|
||||
'friendly_name': '0.0.0.0 /ssl disk free',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfInformation.GIBIBYTES: 'GiB'>,
|
||||
}),
|
||||
|
@ -875,7 +861,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': '/ssl disk usage',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -889,7 +875,6 @@
|
|||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': '0.0.0.0 /ssl disk usage',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
|
@ -925,7 +910,7 @@
|
|||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DATA_SIZE: 'data_size'>,
|
||||
'original_icon': 'mdi:harddisk',
|
||||
'original_icon': None,
|
||||
'original_name': '/ssl disk used',
|
||||
'platform': 'glances',
|
||||
'previous_unique_id': None,
|
||||
|
@ -940,7 +925,6 @@
|
|||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'data_size',
|
||||
'friendly_name': '0.0.0.0 /ssl disk used',
|
||||
'icon': 'mdi:harddisk',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfInformation.GIBIBYTES: 'GiB'>,
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue