mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00: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:
parent
2da37778af
commit
9e01591cac
3
homeassistant/components/blackbird/const.py
Normal file
3
homeassistant/components/blackbird/const.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
"""Constants for the Monoprice Blackbird Matrix Switch component."""
|
||||||
|
DOMAIN = "blackbird"
|
||||||
|
SERVICE_SETALLZONES = "set_all_zones"
|
@ -8,7 +8,6 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
|
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
|
||||||
from homeassistant.components.media_player.const import (
|
from homeassistant.components.media_player.const import (
|
||||||
DOMAIN,
|
|
||||||
SUPPORT_SELECT_SOURCE,
|
SUPPORT_SELECT_SOURCE,
|
||||||
SUPPORT_TURN_OFF,
|
SUPPORT_TURN_OFF,
|
||||||
SUPPORT_TURN_ON,
|
SUPPORT_TURN_ON,
|
||||||
@ -23,6 +22,7 @@ from homeassistant.const import (
|
|||||||
STATE_ON,
|
STATE_ON,
|
||||||
)
|
)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from .const import DOMAIN, SERVICE_SETALLZONES
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -39,7 +39,6 @@ CONF_SOURCES = "sources"
|
|||||||
|
|
||||||
DATA_BLACKBIRD = "blackbird"
|
DATA_BLACKBIRD = "blackbird"
|
||||||
|
|
||||||
SERVICE_SETALLZONES = "blackbird_set_all_zones"
|
|
||||||
ATTR_SOURCE = "source"
|
ATTR_SOURCE = "source"
|
||||||
|
|
||||||
BLACKBIRD_SETALLZONES_SCHEMA = MEDIA_PLAYER_SCHEMA.extend(
|
BLACKBIRD_SETALLZONES_SCHEMA = MEDIA_PLAYER_SCHEMA.extend(
|
||||||
|
@ -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'
|
||||||
|
|
@ -258,16 +258,6 @@ songpal_set_sound_setting:
|
|||||||
description: Value to set.
|
description: Value to set.
|
||||||
example: 'on'
|
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:
|
epson_select_cmode:
|
||||||
description: Select Color mode of Epson projector
|
description: Select Color mode of Epson projector
|
||||||
fields:
|
fields:
|
||||||
|
@ -5,7 +5,6 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from homeassistant.components.media_player.const import (
|
from homeassistant.components.media_player.const import (
|
||||||
DOMAIN,
|
|
||||||
SUPPORT_TURN_ON,
|
SUPPORT_TURN_ON,
|
||||||
SUPPORT_TURN_OFF,
|
SUPPORT_TURN_OFF,
|
||||||
SUPPORT_SELECT_SOURCE,
|
SUPPORT_SELECT_SOURCE,
|
||||||
@ -16,9 +15,9 @@ import tests.common
|
|||||||
from homeassistant.components.blackbird.media_player import (
|
from homeassistant.components.blackbird.media_player import (
|
||||||
DATA_BLACKBIRD,
|
DATA_BLACKBIRD,
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
SERVICE_SETALLZONES,
|
|
||||||
setup_platform,
|
setup_platform,
|
||||||
)
|
)
|
||||||
|
from homeassistant.components.blackbird.const import DOMAIN, SERVICE_SETALLZONES
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user