diff --git a/homeassistant/components/yalexs_ble/binary_sensor.py b/homeassistant/components/yalexs_ble/binary_sensor.py index 32421f67fbb..8213baf33aa 100644 --- a/homeassistant/components/yalexs_ble/binary_sensor.py +++ b/homeassistant/components/yalexs_ble/binary_sensor.py @@ -32,7 +32,6 @@ class YaleXSBLEDoorSensor(YALEXSBLEEntity, BinarySensorEntity): """Yale XS BLE binary sensor.""" _attr_device_class = BinarySensorDeviceClass.DOOR - _attr_has_entity_name = True @callback def _async_update_state( diff --git a/homeassistant/components/yalexs_ble/entity.py b/homeassistant/components/yalexs_ble/entity.py index 18f1e28ece6..51f30b8a861 100644 --- a/homeassistant/components/yalexs_ble/entity.py +++ b/homeassistant/components/yalexs_ble/entity.py @@ -15,6 +15,7 @@ from .models import YaleXSBLEData class YALEXSBLEEntity(Entity): """Base class for yale xs ble entities.""" + _attr_has_entity_name = True _attr_should_poll = False def __init__(self, data: YaleXSBLEData) -> None: diff --git a/homeassistant/components/yalexs_ble/lock.py b/homeassistant/components/yalexs_ble/lock.py index 0ecf0e7b697..d457784a038 100644 --- a/homeassistant/components/yalexs_ble/lock.py +++ b/homeassistant/components/yalexs_ble/lock.py @@ -28,7 +28,6 @@ async def async_setup_entry( class YaleXSBLELock(YALEXSBLEEntity, LockEntity): """A yale xs ble lock.""" - _attr_has_entity_name = True _attr_name = None @callback diff --git a/homeassistant/components/yalexs_ble/sensor.py b/homeassistant/components/yalexs_ble/sensor.py index 6304b791edd..9d702ff52eb 100644 --- a/homeassistant/components/yalexs_ble/sensor.py +++ b/homeassistant/components/yalexs_ble/sensor.py @@ -44,7 +44,6 @@ class YaleXSBLESensorEntityDescription( SENSORS: tuple[YaleXSBLESensorEntityDescription, ...] = ( YaleXSBLESensorEntityDescription( key="", # No key for the original RSSI sensor unique id - name="Signal strength", device_class=SensorDeviceClass.SIGNAL_STRENGTH, entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, @@ -55,7 +54,6 @@ SENSORS: tuple[YaleXSBLESensorEntityDescription, ...] = ( ), YaleXSBLESensorEntityDescription( key="battery_level", - name="Battery level", device_class=SensorDeviceClass.BATTERY, entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, @@ -67,7 +65,7 @@ SENSORS: tuple[YaleXSBLESensorEntityDescription, ...] = ( ), YaleXSBLESensorEntityDescription( key="battery_voltage", - name="Battery Voltage", + translation_key="battery_voltage", device_class=SensorDeviceClass.VOLTAGE, entity_category=EntityCategory.DIAGNOSTIC, state_class=SensorStateClass.MEASUREMENT, diff --git a/homeassistant/components/yalexs_ble/strings.json b/homeassistant/components/yalexs_ble/strings.json index bd96e07f6ba..c79830be3a9 100644 --- a/homeassistant/components/yalexs_ble/strings.json +++ b/homeassistant/components/yalexs_ble/strings.json @@ -45,5 +45,12 @@ } } } + }, + "entity": { + "sensor": { + "battery_voltage": { + "name": "Battery voltage" + } + } } }