Add icon translations to Poolsense (#112184)

This commit is contained in:
Joost Lekkerkerker 2024-03-06 12:36:35 +01:00 committed by GitHub
parent 503d39ef0d
commit e53dcea007
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 8 deletions

View File

@ -0,0 +1,24 @@
{
"entity": {
"sensor": {
"chlorine": {
"default": "mdi:pool"
},
"water_temp": {
"default": "mdi:coolant-temperature"
},
"chlorine_high": {
"default": "mdi:pool"
},
"chlorine_low": {
"default": "mdi:pool"
},
"ph_high": {
"default": "mdi:pool"
},
"ph_low": {
"default": "mdi:pool"
}
}
}
}

View File

@ -25,11 +25,9 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
key="Chlorine",
translation_key="chlorine",
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
icon="mdi:pool",
),
SensorEntityDescription(
key="pH",
icon="mdi:pool",
device_class=SensorDeviceClass.PH,
),
SensorEntityDescription(
@ -40,36 +38,31 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
key="Water Temp",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
icon="mdi:coolant-temperature",
translation_key="water_temp",
device_class=SensorDeviceClass.TEMPERATURE,
),
SensorEntityDescription(
key="Last Seen",
translation_key="last_seen",
icon="mdi:clock",
device_class=SensorDeviceClass.TIMESTAMP,
),
SensorEntityDescription(
key="Chlorine High",
translation_key="chlorine_high",
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
icon="mdi:pool",
),
SensorEntityDescription(
key="Chlorine Low",
translation_key="chlorine_low",
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
icon="mdi:pool",
),
SensorEntityDescription(
key="pH High",
translation_key="ph_high",
icon="mdi:pool",
),
SensorEntityDescription(
key="pH Low",
translation_key="ph_low",
icon="mdi:pool",
),
)