mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Add entity translations for PoolSense (#95814)
This commit is contained in:
parent
4bc57c0466
commit
8495da1964
@ -17,12 +17,12 @@ from .const import DOMAIN
|
|||||||
BINARY_SENSOR_TYPES: tuple[BinarySensorEntityDescription, ...] = (
|
BINARY_SENSOR_TYPES: tuple[BinarySensorEntityDescription, ...] = (
|
||||||
BinarySensorEntityDescription(
|
BinarySensorEntityDescription(
|
||||||
key="pH Status",
|
key="pH Status",
|
||||||
name="pH Status",
|
translation_key="ph_status",
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||||
),
|
),
|
||||||
BinarySensorEntityDescription(
|
BinarySensorEntityDescription(
|
||||||
key="Chlorine Status",
|
key="Chlorine Status",
|
||||||
name="Chlorine Status",
|
translation_key="chlorine_status",
|
||||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -22,55 +22,53 @@ from .const import DOMAIN
|
|||||||
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="Chlorine",
|
key="Chlorine",
|
||||||
|
translation_key="chlorine",
|
||||||
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
|
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
|
||||||
icon="mdi:pool",
|
icon="mdi:pool",
|
||||||
name="Chlorine",
|
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="pH",
|
key="pH",
|
||||||
|
translation_key="ph",
|
||||||
icon="mdi:pool",
|
icon="mdi:pool",
|
||||||
name="pH",
|
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="Battery",
|
key="Battery",
|
||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
name="Battery",
|
|
||||||
device_class=SensorDeviceClass.BATTERY,
|
device_class=SensorDeviceClass.BATTERY,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="Water Temp",
|
key="Water Temp",
|
||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
icon="mdi:coolant-temperature",
|
icon="mdi:coolant-temperature",
|
||||||
name="Temperature",
|
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="Last Seen",
|
key="Last Seen",
|
||||||
|
translation_key="last_seen",
|
||||||
icon="mdi:clock",
|
icon="mdi:clock",
|
||||||
name="Last Seen",
|
|
||||||
device_class=SensorDeviceClass.TIMESTAMP,
|
device_class=SensorDeviceClass.TIMESTAMP,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="Chlorine High",
|
key="Chlorine High",
|
||||||
|
translation_key="chlorine_high",
|
||||||
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
|
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
|
||||||
icon="mdi:pool",
|
icon="mdi:pool",
|
||||||
name="Chlorine High",
|
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="Chlorine Low",
|
key="Chlorine Low",
|
||||||
|
translation_key="chlorine_low",
|
||||||
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
|
native_unit_of_measurement=UnitOfElectricPotential.MILLIVOLT,
|
||||||
icon="mdi:pool",
|
icon="mdi:pool",
|
||||||
name="Chlorine Low",
|
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="pH High",
|
key="pH High",
|
||||||
|
translation_key="ph_high",
|
||||||
icon="mdi:pool",
|
icon="mdi:pool",
|
||||||
name="pH High",
|
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="pH Low",
|
key="pH Low",
|
||||||
|
translation_key="ph_low",
|
||||||
icon="mdi:pool",
|
icon="mdi:pool",
|
||||||
name="pH Low",
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -14,5 +14,38 @@
|
|||||||
"abort": {
|
"abort": {
|
||||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"binary_sensor": {
|
||||||
|
"ph_status": {
|
||||||
|
"name": "pH status"
|
||||||
|
},
|
||||||
|
"chlorine_status": {
|
||||||
|
"name": "Chlorine status"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sensor": {
|
||||||
|
"chlorine": {
|
||||||
|
"name": "Chlorine"
|
||||||
|
},
|
||||||
|
"ph": {
|
||||||
|
"name": "pH"
|
||||||
|
},
|
||||||
|
"last_seen": {
|
||||||
|
"name": "Last seen"
|
||||||
|
},
|
||||||
|
"chlorine_high": {
|
||||||
|
"name": "Chlorine high"
|
||||||
|
},
|
||||||
|
"chlorine_low": {
|
||||||
|
"name": "Chlorine low"
|
||||||
|
},
|
||||||
|
"ph_high": {
|
||||||
|
"name": "pH high"
|
||||||
|
},
|
||||||
|
"ph_low": {
|
||||||
|
"name": "pH low"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user