mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Override available property in button platform for Squeezebox (#144693)
This commit is contained in:
parent
554cb27703
commit
b394c07a3d
@ -153,6 +153,11 @@ class SqueezeboxButtonEntity(SqueezeboxEntity, ButtonEntity):
|
||||
f"{format_mac(self._player.player_id)}_{entity_description.key}"
|
||||
)
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
"""Return True if entity is available."""
|
||||
return self.coordinator.available and super().available
|
||||
|
||||
async def async_press(self) -> None:
|
||||
"""Execute the button action."""
|
||||
await self._player.async_query("button", self.entity_description.press_action)
|
||||
|
Loading…
x
Reference in New Issue
Block a user