Override available property in button platform for Squeezebox (#144693)

This commit is contained in:
peteS-UK 2025-05-11 20:15:12 +01:00 committed by GitHub
parent 554cb27703
commit b394c07a3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -153,6 +153,11 @@ class SqueezeboxButtonEntity(SqueezeboxEntity, ButtonEntity):
f"{format_mac(self._player.player_id)}_{entity_description.key}" 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: async def async_press(self) -> None:
"""Execute the button action.""" """Execute the button action."""
await self._player.async_query("button", self.entity_description.press_action) await self._player.async_query("button", self.entity_description.press_action)