Translate entity names for Yale Smart Living (#93560)

This commit is contained in:
G Johansson 2023-05-31 03:22:11 +02:00 committed by GitHub
parent 466eec2f04
commit 5e1c9ba80d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 5 deletions

View file

@ -20,25 +20,25 @@ SENSOR_TYPES = (
key="acfail",
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
name="Power loss",
translation_key="power_loss",
),
BinarySensorEntityDescription(
key="battery",
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
name="Battery",
translation_key="battery",
),
BinarySensorEntityDescription(
key="tamper",
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
name="Tamper",
translation_key="tamper",
),
BinarySensorEntityDescription(
key="jam",
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
name="Jam",
translation_key="jam",
),
)

View file

@ -15,7 +15,7 @@ from .entity import YaleAlarmEntity
BUTTON_TYPES = (
ButtonEntityDescription(
key="panic",
name="Panic button",
translation_key="panic",
icon="mdi:alarm-light",
),
)

View file

@ -39,5 +39,26 @@
"error": {
"code_format_mismatch": "The code does not match the required number of digits"
}
},
"entity": {
"binary_sensor": {
"power_loss": {
"name": "Power loss"
},
"battery": {
"name": "Battery"
},
"tamper": {
"name": "Tamper"
},
"jam": {
"name": "Jam"
}
},
"button": {
"panic": {
"name": "Panic button"
}
}
}
}