Skip to content

Commit

Permalink
Translate entity names for Yale Smart Living (#93560)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST committed May 31, 2023
1 parent 466eec2 commit 5e1c9ba
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
8 changes: 4 additions & 4 deletions homeassistant/components/yale_smart_alarm/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@
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",
),
)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/yale_smart_alarm/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
BUTTON_TYPES = (
ButtonEntityDescription(
key="panic",
name="Panic button",
translation_key="panic",
icon="mdi:alarm-light",
),
)
Expand Down
21 changes: 21 additions & 0 deletions homeassistant/components/yale_smart_alarm/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}

0 comments on commit 5e1c9ba

Please sign in to comment.