Add icon translations to UPnP (#112335)

* Add icon translations to UPnP

* Add icon translations to UPnP
pull/112477/head
Joost Lekkerkerker 2024-03-06 06:31:37 +01:00 committed by GitHub
parent 421014bf8d
commit f357e13e3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 39 additions and 11 deletions

View File

@ -0,0 +1,39 @@
{
"entity": {
"sensor": {
"data_received": {
"default": "mdi:server-network"
},
"data_sent": {
"default": "mdi:server-network"
},
"packets_received": {
"default": "mdi:server-network"
},
"packets_sent": {
"default": "mdi:server-network"
},
"external_ip": {
"default": "mdi:server-network"
},
"uptime": {
"default": "mdi:server-network"
},
"wan_status": {
"default": "mdi:server-network"
},
"download_speed": {
"default": "mdi:server-network"
},
"upload_speed": {
"default": "mdi:server-network"
},
"packet_download_speed": {
"default": "mdi:server-network"
},
"packet_upload_speed": {
"default": "mdi:server-network"
}
}
}
}

View File

@ -50,7 +50,6 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
UpnpSensorEntityDescription(
key=BYTES_RECEIVED,
translation_key="data_received",
icon="mdi:server-network",
device_class=SensorDeviceClass.DATA_SIZE,
native_unit_of_measurement=UnitOfInformation.BYTES,
entity_registry_enabled_default=False,
@ -60,7 +59,6 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
UpnpSensorEntityDescription(
key=BYTES_SENT,
translation_key="data_sent",
icon="mdi:server-network",
device_class=SensorDeviceClass.DATA_SIZE,
native_unit_of_measurement=UnitOfInformation.BYTES,
entity_registry_enabled_default=False,
@ -70,7 +68,6 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
UpnpSensorEntityDescription(
key=PACKETS_RECEIVED,
translation_key="packets_received",
icon="mdi:server-network",
native_unit_of_measurement=DATA_PACKETS,
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
@ -79,7 +76,6 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
UpnpSensorEntityDescription(
key=PACKETS_SENT,
translation_key="packets_sent",
icon="mdi:server-network",
native_unit_of_measurement=DATA_PACKETS,
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
@ -88,13 +84,11 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
UpnpSensorEntityDescription(
key=ROUTER_IP,
translation_key="external_ip",
icon="mdi:server-network",
entity_category=EntityCategory.DIAGNOSTIC,
),
UpnpSensorEntityDescription(
key=ROUTER_UPTIME,
translation_key="uptime",
icon="mdi:server-network",
native_unit_of_measurement=UnitOfTime.SECONDS,
entity_registry_enabled_default=False,
entity_category=EntityCategory.DIAGNOSTIC,
@ -103,7 +97,6 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
UpnpSensorEntityDescription(
key=WAN_STATUS,
translation_key="wan_status",
icon="mdi:server-network",
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
@ -112,7 +105,6 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
translation_key="download_speed",
value_key=KIBIBYTES_PER_SEC_RECEIVED,
unique_id="KiB/sec_received",
icon="mdi:server-network",
device_class=SensorDeviceClass.DATA_RATE,
native_unit_of_measurement=UnitOfDataRate.KIBIBYTES_PER_SECOND,
state_class=SensorStateClass.MEASUREMENT,
@ -123,7 +115,6 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
translation_key="upload_speed",
value_key=KIBIBYTES_PER_SEC_SENT,
unique_id="KiB/sec_sent",
icon="mdi:server-network",
device_class=SensorDeviceClass.DATA_RATE,
native_unit_of_measurement=UnitOfDataRate.KIBIBYTES_PER_SECOND,
state_class=SensorStateClass.MEASUREMENT,
@ -134,7 +125,6 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
translation_key="packet_download_speed",
value_key=PACKETS_PER_SEC_RECEIVED,
unique_id="packets/sec_received",
icon="mdi:server-network",
native_unit_of_measurement=DATA_RATE_PACKETS_PER_SECOND,
entity_registry_enabled_default=False,
state_class=SensorStateClass.MEASUREMENT,
@ -145,7 +135,6 @@ SENSOR_DESCRIPTIONS: tuple[UpnpSensorEntityDescription, ...] = (
translation_key="packet_upload_speed",
value_key=PACKETS_PER_SEC_SENT,
unique_id="packets/sec_sent",
icon="mdi:server-network",
native_unit_of_measurement=DATA_RATE_PACKETS_PER_SECOND,
entity_registry_enabled_default=False,
state_class=SensorStateClass.MEASUREMENT,