Clean up variables in Soundtouch (#99859)
This commit is contained in:
parent
5e2bf2b015
commit
76c569c62d
1 changed files with 9 additions and 13 deletions
|
@ -78,21 +78,25 @@ class SoundTouchMediaPlayer(MediaPlayerEntity):
|
|||
_attr_device_class = MediaPlayerDeviceClass.SPEAKER
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
_attr_source_list = [
|
||||
Source.AUX.value,
|
||||
Source.BLUETOOTH.value,
|
||||
]
|
||||
|
||||
def __init__(self, device: SoundTouchDevice) -> None:
|
||||
"""Create SoundTouch media player entity."""
|
||||
|
||||
self._device = device
|
||||
|
||||
self._attr_unique_id = self._device.config.device_id
|
||||
self._attr_unique_id = device.config.device_id
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, self._device.config.device_id)},
|
||||
identifiers={(DOMAIN, device.config.device_id)},
|
||||
connections={
|
||||
(CONNECTION_NETWORK_MAC, format_mac(self._device.config.mac_address))
|
||||
(CONNECTION_NETWORK_MAC, format_mac(device.config.mac_address))
|
||||
},
|
||||
manufacturer="Bose Corporation",
|
||||
model=self._device.config.type,
|
||||
name=self._device.config.name,
|
||||
model=device.config.type,
|
||||
name=device.config.name,
|
||||
)
|
||||
|
||||
self._status = None
|
||||
|
@ -131,14 +135,6 @@ class SoundTouchMediaPlayer(MediaPlayerEntity):
|
|||
"""Name of the current input source."""
|
||||
return self._status.source
|
||||
|
||||
@property
|
||||
def source_list(self):
|
||||
"""List of available input sources."""
|
||||
return [
|
||||
Source.AUX.value,
|
||||
Source.BLUETOOTH.value,
|
||||
]
|
||||
|
||||
@property
|
||||
def is_volume_muted(self):
|
||||
"""Boolean if volume is currently muted."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue