Change default name of motion blind TDBU entities so they can be auto renamed (#72284)
Change the default name of motion blind TDBU entities so they can be automatically renamed
This commit is contained in:
parent
1a43f107c4
commit
8c9d7b392b
2 changed files with 7 additions and 7 deletions
|
@ -182,7 +182,7 @@ class MotionPositionDevice(CoordinatorEntity, CoverEntity):
|
|||
else:
|
||||
via_device = (DOMAIN, blind._gateway.mac)
|
||||
connections = {}
|
||||
name = f"{blind.blind_type}-{blind.mac[12:]}"
|
||||
name = f"{blind.blind_type} {blind.mac[12:]}"
|
||||
sw_version = None
|
||||
|
||||
self._attr_device_class = device_class
|
||||
|
@ -364,7 +364,7 @@ class MotionTDBUDevice(MotionPositionDevice):
|
|||
super().__init__(coordinator, blind, device_class, sw_version)
|
||||
self._motor = motor
|
||||
self._motor_key = motor[0]
|
||||
self._attr_name = f"{blind.blind_type}-{motor}-{blind.mac[12:]}"
|
||||
self._attr_name = f"{blind.blind_type} {blind.mac[12:]} {motor}"
|
||||
self._attr_unique_id = f"{blind.mac}-{motor}"
|
||||
|
||||
if self._motor not in ["Bottom", "Top", "Combined"]:
|
||||
|
|
|
@ -55,9 +55,9 @@ class MotionBatterySensor(CoordinatorEntity, SensorEntity):
|
|||
super().__init__(coordinator)
|
||||
|
||||
if blind.device_type in DEVICE_TYPES_WIFI:
|
||||
name = f"{blind.blind_type}-battery"
|
||||
name = f"{blind.blind_type} battery"
|
||||
else:
|
||||
name = f"{blind.blind_type}-battery-{blind.mac[12:]}"
|
||||
name = f"{blind.blind_type} {blind.mac[12:]} battery"
|
||||
|
||||
self._blind = blind
|
||||
self._attr_device_info = DeviceInfo(identifiers={(DOMAIN, blind.mac)})
|
||||
|
@ -104,9 +104,9 @@ class MotionTDBUBatterySensor(MotionBatterySensor):
|
|||
super().__init__(coordinator, blind)
|
||||
|
||||
if blind.device_type in DEVICE_TYPES_WIFI:
|
||||
name = f"{blind.blind_type}-{motor}-battery"
|
||||
name = f"{blind.blind_type} {motor} battery"
|
||||
else:
|
||||
name = f"{blind.blind_type}-{motor}-battery-{blind.mac[12:]}"
|
||||
name = f"{blind.blind_type} {blind.mac[12:]} {motor} battery"
|
||||
|
||||
self._motor = motor
|
||||
self._attr_unique_id = f"{blind.mac}-{motor}-battery"
|
||||
|
@ -147,7 +147,7 @@ class MotionSignalStrengthSensor(CoordinatorEntity, SensorEntity):
|
|||
elif device.device_type in DEVICE_TYPES_WIFI:
|
||||
name = f"{device.blind_type} signal strength"
|
||||
else:
|
||||
name = f"{device.blind_type} signal strength - {device.mac[12:]}"
|
||||
name = f"{device.blind_type} {device.mac[12:]} signal strength"
|
||||
|
||||
self._device = device
|
||||
self._device_type = device_type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue