1
mirror of https://github.com/home-assistant/core synced 2024-07-30 21:18:57 +02:00

Update service domain for blackbird from 'media_player' to 'blackbird' (#29112)

* move service constants to const.py, update blackbird custom service domain

* Readd bluesound services.yaml entries since it should be part of a different branch
This commit is contained in:
Raman Gupta 2019-11-26 14:10:13 -05:00 committed by Paulus Schoutsen
parent 2da37778af
commit 9e01591cac
5 changed files with 15 additions and 14 deletions

View File

@ -0,0 +1,3 @@
"""Constants for the Monoprice Blackbird Matrix Switch component."""
DOMAIN = "blackbird"
SERVICE_SETALLZONES = "set_all_zones"

View File

@ -8,7 +8,6 @@ import voluptuous as vol
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player.const import (
DOMAIN,
SUPPORT_SELECT_SOURCE,
SUPPORT_TURN_OFF,
SUPPORT_TURN_ON,
@ -23,6 +22,7 @@ from homeassistant.const import (
STATE_ON,
)
import homeassistant.helpers.config_validation as cv
from .const import DOMAIN, SERVICE_SETALLZONES
_LOGGER = logging.getLogger(__name__)
@ -39,7 +39,6 @@ CONF_SOURCES = "sources"
DATA_BLACKBIRD = "blackbird"
SERVICE_SETALLZONES = "blackbird_set_all_zones"
ATTR_SOURCE = "source"
BLACKBIRD_SETALLZONES_SCHEMA = MEDIA_PLAYER_SCHEMA.extend(

View File

@ -0,0 +1,10 @@
set_all_zones:
description: Set all Blackbird zones to a single source.
fields:
entity_id:
description: Name of any blackbird zone.
example: 'media_player.zone_1'
source:
description: Name of source to switch to.
example: 'Source 1'

View File

@ -258,16 +258,6 @@ songpal_set_sound_setting:
description: Value to set.
example: 'on'
blackbird_set_all_zones:
description: Set all Blackbird zones to a single source.
fields:
entity_id:
description: Name of any blackbird zone.
example: 'media_player.zone_1'
source:
description: Name of source to switch to.
example: 'Source 1'
epson_select_cmode:
description: Select Color mode of Epson projector
fields:

View File

@ -5,7 +5,6 @@ import voluptuous as vol
from collections import defaultdict
from homeassistant.components.media_player.const import (
DOMAIN,
SUPPORT_TURN_ON,
SUPPORT_TURN_OFF,
SUPPORT_SELECT_SOURCE,
@ -16,9 +15,9 @@ import tests.common
from homeassistant.components.blackbird.media_player import (
DATA_BLACKBIRD,
PLATFORM_SCHEMA,
SERVICE_SETALLZONES,
setup_platform,
)
from homeassistant.components.blackbird.const import DOMAIN, SERVICE_SETALLZONES
import pytest