mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Use shorthand attributes in Yamaha Musiccast (#100220)
This commit is contained in:
parent
6545fba549
commit
4e202eb376
@ -136,24 +136,9 @@ class MusicCastEntity(CoordinatorEntity[MusicCastDataUpdateCoordinator]):
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize the MusicCast entity."""
|
"""Initialize the MusicCast entity."""
|
||||||
super().__init__(coordinator)
|
super().__init__(coordinator)
|
||||||
self._enabled_default = enabled_default
|
self._attr_entity_registry_enabled_default = enabled_default
|
||||||
self._icon = icon
|
self._attr_icon = icon
|
||||||
self._name = name
|
self._attr_name = name
|
||||||
|
|
||||||
@property
|
|
||||||
def name(self) -> str:
|
|
||||||
"""Return the name of the entity."""
|
|
||||||
return self._name
|
|
||||||
|
|
||||||
@property
|
|
||||||
def icon(self) -> str:
|
|
||||||
"""Return the mdi icon of the entity."""
|
|
||||||
return self._icon
|
|
||||||
|
|
||||||
@property
|
|
||||||
def entity_registry_enabled_default(self) -> bool:
|
|
||||||
"""Return if the entity should be enabled when first added to the entity registry."""
|
|
||||||
return self._enabled_default
|
|
||||||
|
|
||||||
|
|
||||||
class MusicCastDeviceEntity(MusicCastEntity):
|
class MusicCastDeviceEntity(MusicCastEntity):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user