Skip to content
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

Update service domain for yamaha from 'media_player' to 'yamaha' #29142

Merged
merged 2 commits into from Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveragerc
Expand Up @@ -790,7 +790,6 @@ omit =
homeassistant/components/xmpp/notify.py
homeassistant/components/xs1/*
homeassistant/components/yale_smart_alarm/alarm_control_panel.py
homeassistant/components/yamaha/media_player.py
homeassistant/components/yamaha_musiccast/media_player.py
homeassistant/components/yandex_transport/*
homeassistant/components/yeelight/*
Expand Down
50 changes: 0 additions & 50 deletions homeassistant/components/media_player/services.yaml
Expand Up @@ -156,53 +156,3 @@ shuffle_set:
shuffle:
description: True/false for enabling/disabling shuffle.
example: true

soundtouch_play_everywhere:
description: Play on all Bose Soundtouch devices.
fields:
master:
description: Name of the master entity that will coordinate the grouping. Platform dependent. It is a shortcut for creating a multi-room zone with all devices
example: 'media_player.soundtouch_home'

soundtouch_create_zone:
description: Create a Sountouch multi-room zone.
fields:
master:
description: Name of the master entity that will coordinate the multi-room zone. Platform dependent.
example: 'media_player.soundtouch_home'
slaves:
description: Name of slaves entities to add to the new zone.
example: 'media_player.soundtouch_bedroom'

soundtouch_add_zone_slave:
description: Add a slave to a Sountouch multi-room zone.
fields:
master:
description: Name of the master entity that is coordinating the multi-room zone. Platform dependent.
example: 'media_player.soundtouch_home'
slaves:
description: Name of slaves entities to add to the existing zone.
example: 'media_player.soundtouch_bedroom'

soundtouch_remove_zone_slave:
description: Remove a slave from the Sounttouch multi-room zone.
fields:
master:
description: Name of the master entity that is coordinating the multi-room zone. Platform dependent.
example: 'media_player.soundtouch_home'
slaves:
description: Name of slaves entities to remove from the existing zone.
example: 'media_player.soundtouch_bedroom'

yamaha_enable_output:
description: Enable or disable an output port
fields:
entity_id:
description: Name(s) of entites to enable/disable port on.
example: 'media_player.yamaha'
port:
description: Name of port to enable/disable.
example: 'hdmi1'
enabled:
description: Boolean indicating if port should be enabled or not.
example: true
3 changes: 3 additions & 0 deletions homeassistant/components/yamaha/const.py
@@ -0,0 +1,3 @@
"""Constants for the Yamaha component."""
DOMAIN = "yamaha"
SERVICE_ENABLE_OUTPUT = "enable_output"
5 changes: 2 additions & 3 deletions homeassistant/components/yamaha/media_player.py
Expand Up @@ -7,7 +7,6 @@

from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA
from homeassistant.components.media_player.const import (
DOMAIN,
MEDIA_TYPE_MUSIC,
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
Expand All @@ -34,6 +33,8 @@
)
import homeassistant.helpers.config_validation as cv

from .const import DOMAIN, SERVICE_ENABLE_OUTPUT

_LOGGER = logging.getLogger(__name__)

ATTR_ENABLED = "enabled"
Expand All @@ -53,8 +54,6 @@
{vol.Required(ATTR_ENABLED): cv.boolean, vol.Required(ATTR_PORT): cv.string}
)

SERVICE_ENABLE_OUTPUT = "yamaha_enable_output"

SUPPORT_YAMAHA = (
SUPPORT_VOLUME_SET
| SUPPORT_VOLUME_MUTE
Expand Down
12 changes: 12 additions & 0 deletions homeassistant/components/yamaha/services.yaml
@@ -0,0 +1,12 @@
enable_output:
description: Enable or disable an output port
fields:
entity_id:
description: Name(s) of entites to enable/disable port on.
example: 'media_player.yamaha'
port:
description: Name of port to enable/disable.
example: 'hdmi1'
enabled:
description: Boolean indicating if port should be enabled or not.
example: true