Fix some entity naming (#95562)

This commit is contained in:
Paulus Schoutsen 2023-06-29 13:11:17 -04:00 committed by GitHub
parent 33be262ad7
commit 9cace8e4bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -190,6 +190,7 @@ async def async_setup_entry(
class SonosMediaPlayerEntity(SonosEntity, MediaPlayerEntity):
"""Representation of a Sonos entity."""
_attr_name = None
_attr_supported_features = (
MediaPlayerEntityFeature.BROWSE_MEDIA
| MediaPlayerEntityFeature.CLEAR_PLAYLIST

View File

@ -118,7 +118,9 @@ class WLEDSegmentLight(WLEDEntity, LightEntity):
# Segment 0 uses a simpler name, which is more natural for when using
# a single segment / using WLED with one big LED strip.
if segment != 0:
if segment == 0:
self._attr_name = None
else:
self._attr_name = f"Segment {segment}"
self._attr_unique_id = (

View File

@ -187,6 +187,7 @@ class MiroboVacuum(
):
"""Representation of a Xiaomi Vacuum cleaner robot."""
_attr_name = None
_attr_supported_features = (
VacuumEntityFeature.STATE
| VacuumEntityFeature.PAUSE