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", key="acfail",
device_class=BinarySensorDeviceClass.PROBLEM, device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC, entity_category=EntityCategory.DIAGNOSTIC,
name="Power loss", translation_key="power_loss",
), ),
BinarySensorEntityDescription( BinarySensorEntityDescription(
key="battery", key="battery",
device_class=BinarySensorDeviceClass.PROBLEM, device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC, entity_category=EntityCategory.DIAGNOSTIC,
name="Battery", translation_key="battery",
), ),
BinarySensorEntityDescription( BinarySensorEntityDescription(
key="tamper", key="tamper",
device_class=BinarySensorDeviceClass.PROBLEM, device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC, entity_category=EntityCategory.DIAGNOSTIC,
name="Tamper", translation_key="tamper",
), ),
BinarySensorEntityDescription( BinarySensorEntityDescription(
key="jam", key="jam",
device_class=BinarySensorDeviceClass.PROBLEM, device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC, entity_category=EntityCategory.DIAGNOSTIC,
name="Jam", translation_key="jam",
), ),
) )

View file

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

View file

@ -39,5 +39,26 @@
"error": { "error": {
"code_format_mismatch": "The code does not match the required number of digits" "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"
}
}
} }
} }