Update service domain for bluesound from 'media_player' to 'bluesound' (#29111)
* move service constants to const.py, move services to bluesound domain * Remove bluesound services from media_player/services.yaml
This commit is contained in:
parent
1c73ac5df8
commit
2da37778af
5 changed files with 44 additions and 37 deletions
|
@ -83,7 +83,7 @@ omit =
|
|||
homeassistant/components/blinkt/light.py
|
||||
homeassistant/components/blockchain/sensor.py
|
||||
homeassistant/components/bloomsky/*
|
||||
homeassistant/components/bluesound/media_player.py
|
||||
homeassistant/components/bluesound/*
|
||||
homeassistant/components/bluetooth_le_tracker/device_tracker.py
|
||||
homeassistant/components/bluetooth_tracker/device_tracker.py
|
||||
homeassistant/components/bme280/sensor.py
|
||||
|
|
6
homeassistant/components/bluesound/const.py
Normal file
6
homeassistant/components/bluesound/const.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
"""Constants for the Bluesound HiFi wireless speakers and audio integrations component."""
|
||||
DOMAIN = "bluesound"
|
||||
SERVICE_CLEAR_TIMER = "clear_sleep_timer"
|
||||
SERVICE_JOIN = "join"
|
||||
SERVICE_SET_TIMER = "set_sleep_timer"
|
||||
SERVICE_UNJOIN = "unjoin"
|
|
@ -15,7 +15,6 @@ import xmltodict
|
|||
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
|
||||
from homeassistant.components.media_player.const import (
|
||||
ATTR_MEDIA_ENQUEUE,
|
||||
DOMAIN,
|
||||
MEDIA_TYPE_MUSIC,
|
||||
SUPPORT_CLEAR_PLAYLIST,
|
||||
SUPPORT_NEXT_TRACK,
|
||||
|
@ -50,6 +49,13 @@ import homeassistant.helpers.config_validation as cv
|
|||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.util import Throttle
|
||||
import homeassistant.util.dt as dt_util
|
||||
from .const import (
|
||||
DOMAIN,
|
||||
SERVICE_CLEAR_TIMER,
|
||||
SERVICE_JOIN,
|
||||
SERVICE_SET_TIMER,
|
||||
SERVICE_UNJOIN,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -62,10 +68,6 @@ DEFAULT_PORT = 11000
|
|||
NODE_OFFLINE_CHECK_TIMEOUT = 180
|
||||
NODE_RETRY_INITIATION = timedelta(minutes=3)
|
||||
|
||||
SERVICE_CLEAR_TIMER = "bluesound_clear_sleep_timer"
|
||||
SERVICE_JOIN = "bluesound_join"
|
||||
SERVICE_SET_TIMER = "bluesound_set_sleep_timer"
|
||||
SERVICE_UNJOIN = "bluesound_unjoin"
|
||||
STATE_GROUPED = "grouped"
|
||||
SYNC_STATUS_INTERVAL = timedelta(minutes=5)
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
join:
|
||||
description: Group player together.
|
||||
fields:
|
||||
master:
|
||||
description: Entity ID of the player that should become the master of the group.
|
||||
example: 'media_player.bluesound_livingroom'
|
||||
entity_id:
|
||||
description: Name(s) of entities that will coordinate the grouping. Platform dependent.
|
||||
example: 'media_player.bluesound_livingroom'
|
||||
|
||||
unjoin:
|
||||
description: Unjoin the player from a group.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name(s) of entities that will be unjoined from their group. Platform dependent.
|
||||
example: 'media_player.bluesound_livingroom'
|
||||
|
||||
set_sleep_timer:
|
||||
description: "Set a Bluesound timer. It will increase timer in steps: 15, 30, 45, 60, 90, 0"
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name(s) of entities that will have a timer set.
|
||||
example: 'media_player.bluesound_livingroom'
|
||||
|
||||
clear_sleep_timer:
|
||||
description: Clear a Bluesound timer.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name(s) of entities that will have the timer cleared.
|
||||
example: 'media_player.bluesound_livingroom'
|
|
@ -244,37 +244,6 @@ yamaha_enable_output:
|
|||
description: Boolean indicating if port should be enabled or not.
|
||||
example: true
|
||||
|
||||
bluesound_join:
|
||||
description: Group player together.
|
||||
fields:
|
||||
master:
|
||||
description: Entity ID of the player that should become the master of the group.
|
||||
example: 'media_player.bluesound_livingroom'
|
||||
entity_id:
|
||||
description: Name(s) of entities that will coordinate the grouping. Platform dependent.
|
||||
example: 'media_player.bluesound_livingroom'
|
||||
|
||||
bluesound_unjoin:
|
||||
description: Unjoin the player from a group.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name(s) of entities that will be unjoined from their group. Platform dependent.
|
||||
example: 'media_player.bluesound_livingroom'
|
||||
|
||||
bluesound_set_sleep_timer:
|
||||
description: "Set a Bluesound timer. It will increase timer in steps: 15, 30, 45, 60, 90, 0"
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name(s) of entities that will have a timer set.
|
||||
example: 'media_player.bluesound_livingroom'
|
||||
|
||||
bluesound_clear_sleep_timer:
|
||||
description: Clear a Bluesound timer.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name(s) of entities that will have the timer cleared.
|
||||
example: 'media_player.bluesound_livingroom'
|
||||
|
||||
songpal_set_sound_setting:
|
||||
description: Change sound setting.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue