Migrate WLED to new entity naming style (#74860)
This commit is contained in:
parent
176e2754ec
commit
f15d3fc5db
9 changed files with 28 additions and 33 deletions
|
@ -71,11 +71,8 @@ class WLEDNumber(WLEDEntity, NumberEntity):
|
|||
|
||||
# Segment 0 uses a simpler name, which is more natural for when using
|
||||
# a single segment / using WLED with one big LED strip.
|
||||
self._attr_name = (
|
||||
f"{coordinator.data.info.name} Segment {segment} {description.name}"
|
||||
)
|
||||
if segment == 0:
|
||||
self._attr_name = f"{coordinator.data.info.name} {description.name}"
|
||||
if segment != 0:
|
||||
self._attr_name = f"Segment {segment} {description.name}"
|
||||
|
||||
self._attr_unique_id = (
|
||||
f"{coordinator.data.info.mac_address}_{description.key}_{segment}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue