Skip to content

Commit 76bbd94

Browse files
authored
Make BTHome binary sensor names translatable (home-assistant#155940)
1 parent b5546b4 commit 76bbd94

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

homeassistant/components/bthome/binary_sensor.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
),
6464
BTHomeBinarySensorDeviceClass.GENERIC: BinarySensorEntityDescription(
6565
key=BTHomeBinarySensorDeviceClass.GENERIC,
66+
translation_key="generic",
6667
),
6768
BTHomeBinarySensorDeviceClass.LIGHT: BinarySensorEntityDescription(
6869
key=BTHomeBinarySensorDeviceClass.LIGHT,
@@ -159,10 +160,7 @@ def sensor_update_to_bluetooth_data_update(
159160
device_key_to_bluetooth_entity_key(device_key): sensor_values.native_value
160161
for device_key, sensor_values in sensor_update.binary_entity_values.items()
161162
},
162-
entity_names={
163-
device_key_to_bluetooth_entity_key(device_key): sensor_values.name
164-
for device_key, sensor_values in sensor_update.binary_entity_values.items()
165-
},
163+
entity_names={},
166164
)
167165

168166

homeassistant/components/bthome/strings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
}
4848
},
4949
"entity": {
50+
"binary_sensor": {
51+
"generic": {
52+
"name": "Generic"
53+
}
54+
},
5055
"event": {
5156
"button": {
5257
"state_attributes": {

0 commit comments

Comments
 (0)