Add icon translations to Aussie Broadband (#108409)

This commit is contained in:
Joost Lekkerkerker 2024-01-19 20:07:20 +01:00 committed by GitHub
parent fff1fc8d19
commit 300b4f161c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 39 additions and 12 deletions

View File

@ -0,0 +1,39 @@
{
"entity": {
"sensor": {
"data_used": {
"default": "mdi:network"
},
"downloaded": {
"default": "mdi:download-network"
},
"uploaded": {
"default": "mdi:upload-network"
},
"national_calls": {
"default": "mdi:phone"
},
"mobile_calls": {
"default": "mdi:phone"
},
"international_calls": {
"default": "mdi:phone-plus"
},
"sms_sent": {
"default": "mdi:message-processing"
},
"voicemail_calls": {
"default": "mdi:phone"
},
"other_calls": {
"default": "mdi:phone"
},
"billing_cycle_length": {
"default": "mdi:calendar-range"
},
"billing_cycle_remaining": {
"default": "mdi:calendar-clock"
}
}
}
}

View File

@ -38,7 +38,6 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.MEGABYTES,
device_class=SensorDeviceClass.DATA_SIZE,
icon="mdi:network",
),
SensorValueEntityDescription(
key="downloadedMb",
@ -46,7 +45,6 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.MEGABYTES,
device_class=SensorDeviceClass.DATA_SIZE,
icon="mdi:download-network",
),
SensorValueEntityDescription(
key="uploadedMb",
@ -54,21 +52,18 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.MEGABYTES,
device_class=SensorDeviceClass.DATA_SIZE,
icon="mdi:upload-network",
),
# Mobile Phone Services sensors
SensorValueEntityDescription(
key="national",
translation_key="national_calls",
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
key="mobile",
translation_key="mobile_calls",
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
@ -76,14 +71,12 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
translation_key="international_calls",
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone-plus",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
key="sms",
translation_key="sms_sent",
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:message-processing",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
@ -92,7 +85,6 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.KILOBYTES,
device_class=SensorDeviceClass.DATA_SIZE,
icon="mdi:network",
value=lambda x: x.get("kbytes"),
),
SensorValueEntityDescription(
@ -100,7 +92,6 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
translation_key="voicemail_calls",
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
@ -108,7 +99,6 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
translation_key="other_calls",
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
value=lambda x: x.get("calls"),
),
# Generic sensors
@ -116,13 +106,11 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
key="daysTotal",
translation_key="billing_cycle_length",
native_unit_of_measurement=UnitOfTime.DAYS,
icon="mdi:calendar-range",
),
SensorValueEntityDescription(
key="daysRemaining",
translation_key="billing_cycle_remaining",
native_unit_of_measurement=UnitOfTime.DAYS,
icon="mdi:calendar-clock",
),
)