Skip to content
  • Sponsor home-assistant/core

  • Notifications You must be signed in to change notification settings
  • Fork 33.1k
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace custom actions for sleep timer with buttons in bluesound integration #133604

Open
wants to merge 22 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cc0f11d
Use entity services
LouisChrist Aug 26, 2024
d6b3f27
Add buttons for sleep timer
LouisChrist Oct 28, 2024
fc93e9c
Merge remote-tracking branch 'upstream/dev' into bluesound_buttons_fo…
LouisChrist Dec 17, 2024
4546c90
Fix merge
LouisChrist Dec 17, 2024
057b738
Replace hass.data with runtime_data from config_entries
LouisChrist Dec 17, 2024
13467d5
Disable button by default
LouisChrist Dec 17, 2024
cc781d4
Remove duplicate dispatchers
LouisChrist Dec 17, 2024
9f00c27
Add tests for buttons
LouisChrist Dec 19, 2024
216e69b
Merge remote-tracking branch 'upstream/dev' into bluesound_buttons_fo…
LouisChrist Jan 8, 2025
912529b
Fix merge commit
LouisChrist Jan 8, 2025
0fdd225
Merge branch 'dev' into bluesound_buttons_for_sleep_timer
LouisChrist Jan 8, 2025
52aaefb
Fix merge commit
LouisChrist Jan 8, 2025
2653a5e
Update deprecation version
LouisChrist Jan 8, 2025
6cf3798
Remove update_before_add
LouisChrist Jan 9, 2025
050868c
Use entity_registry_enabled_by_default
LouisChrist Jan 9, 2025
da979b9
Use EnitiyDescriptions for buttons
LouisChrist Jan 9, 2025
2a35020
Update version for deprecate
LouisChrist Jan 10, 2025
f0eadf3
Use tranlation_key; Move default disable to EntityDescription
LouisChrist Jan 10, 2025
bd554af
Merge remote-tracking branch 'upstream/dev' into bluesound_buttons_fo…
LouisChrist Feb 5, 2025
3768eca
Fix merge commit
LouisChrist Feb 5, 2025
313d839
Merge branch 'dev' into bluesound_buttons_for_sleep_timer
frenck Mar 2, 2025
c21f8d0
Merge remote-tracking branch 'upstream/dev' into bluesound_buttons_fo…
LouisChrist Mar 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/dev' into bluesound_buttons_fo…
…r_sleep_timer
LouisChrist committed Jan 8, 2025

Verified

This commit was signed with the committer’s verified signature.
LouisChrist Louis Christ
commit 216e69b1f3c7912fc29669eb49cba3a504b68478
25 changes: 3 additions & 22 deletions homeassistant/components/bluesound/media_player.py
Original file line number Diff line number Diff line change
@@ -19,10 +19,8 @@
MediaType,
async_process_play_media_url,
)
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.const import CONF_HOST, CONF_HOSTS, CONF_NAME, CONF_PORT
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant, callback
from homeassistant.data_entry_flow import FlowResultType
from homeassistant.const import CONF_HOST, CONF_PORT
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ServiceValidationError
from homeassistant.helpers import config_validation as cv, entity_platform
from homeassistant.helpers.device_registry import (
@@ -35,12 +33,11 @@
async_dispatcher_send,
)
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.util import slugify
import homeassistant.util.dt as dt_util

from .const import ATTR_BLUESOUND_GROUP, ATTR_MASTER, DOMAIN, INTEGRATION_TITLE
from .const import ATTR_BLUESOUND_GROUP, ATTR_MASTER, DOMAIN
from .coordinator import BluesoundCoordinator
from .utils import dispatcher_join_signal, dispatcher_unjoin_signal, format_unique_id

@@ -90,22 +87,6 @@ async def async_setup_entry(
async_add_entities([bluesound_player], update_before_add=True)


async def async_setup_platform(
hass: HomeAssistant,
config: ConfigType,
async_add_entities: AddEntitiesCallback,
discovery_info: DiscoveryInfoType | None,
) -> None:
"""Trigger import flows."""
hosts = config.get(CONF_HOSTS, [])
for host in hosts:
import_data = {
CONF_HOST: host[CONF_HOST],
CONF_PORT: host.get(CONF_PORT, 11000),
}
hass.async_create_task(_async_import(hass, import_data))


class BluesoundPlayer(CoordinatorEntity[BluesoundCoordinator], MediaPlayerEntity):
"""Representation of a Bluesound Player."""

You are viewing a condensed version of this merge commit. You can view the full changes here.