Skip to content

Commit

Permalink
Remove physical device triggers from favourite button entities
Browse files Browse the repository at this point in the history
Improve overlay service description
  • Loading branch information
mj23000 committed Dec 7, 2022
1 parent b6e691e commit 4e76528
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
15 changes: 0 additions & 15 deletions custom_components/bangolufsen/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,6 @@ async def async_press(self) -> None:
"""Handle the action."""
self._client.activate_preset(id=self._favourite_id, async_req=True)

# Trigger the trigger for the physical favourite button.
if 0 < self._favourite_id < 5:
if not isinstance(self._device, DeviceEntry):
self._device = get_device(self.hass, self._unique_id)

assert isinstance(self._device, DeviceEntry)

self.hass.bus.async_fire(
BANGOLUFSEN_EVENT,
event_data={
CONF_TYPE: f"{self._favourite.name}_shortPress",
CONF_DEVICE_ID: self._device.id,
},
)

@callback
def _update_favourite(self) -> None:
"""Update favourite attribute."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/bangolufsen/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"issue_tracker": "https://github.com/bang-olufsen/Mozart-HACS/issues",
"requirements": ["mozart-api==2.3.4.15123.4"],
"zeroconf": ["_bangolufsen._tcp.local."],
"version": "0.1.3",
"version": "0.1.4",
"codeowners": ["@mj23000"],
"iot_class": "local_push",
"config_flow": true
Expand Down
5 changes: 4 additions & 1 deletion custom_components/bangolufsen/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ beolink_leader_command:

overlay_audio:
name: Overlay audio
description: Overlay audio over any currently playing audio.
description: |
Overlay audio over any currently playing audio.
TTS is generated by Bang & Olufsen and is limited to 100 unique messages a day.
Generated TTS messages are cached for 24 hours.
target:
entity:
integration: bangolufsen
Expand Down

0 comments on commit 4e76528

Please sign in to comment.