move service constants to const.py and move channels services to channels domain (#29139)
parent
1f13809c6d
commit
ec61a86678
|
@ -109,7 +109,7 @@ omit =
|
|||
homeassistant/components/cast/*
|
||||
homeassistant/components/cert_expiry/sensor.py
|
||||
homeassistant/components/cert_expiry/helper.py
|
||||
homeassistant/components/channels/media_player.py
|
||||
homeassistant/components/channels/*
|
||||
homeassistant/components/cisco_ios/device_tracker.py
|
||||
homeassistant/components/cisco_mobility_express/device_tracker.py
|
||||
homeassistant/components/cisco_webex_teams/notify.py
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
"""Constants for the Channels component."""
|
||||
DOMAIN = "channels"
|
||||
SERVICE_SEEK_FORWARD = "seek_forward"
|
||||
SERVICE_SEEK_BACKWARD = "seek_backward"
|
||||
SERVICE_SEEK_BY = "seek_by"
|
|
@ -6,7 +6,6 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
|
||||
from homeassistant.components.media_player.const import (
|
||||
DOMAIN,
|
||||
MEDIA_TYPE_CHANNEL,
|
||||
MEDIA_TYPE_EPISODE,
|
||||
MEDIA_TYPE_MOVIE,
|
||||
|
@ -31,6 +30,8 @@ from homeassistant.const import (
|
|||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
from .const import DOMAIN, SERVICE_SEEK_BACKWARD, SERVICE_SEEK_BY, SERVICE_SEEK_FORWARD
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DATA_CHANNELS = "channels"
|
||||
|
@ -56,9 +57,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
}
|
||||
)
|
||||
|
||||
SERVICE_SEEK_FORWARD = "channels_seek_forward"
|
||||
SERVICE_SEEK_BACKWARD = "channels_seek_backward"
|
||||
SERVICE_SEEK_BY = "channels_seek_by"
|
||||
|
||||
# Service call validation schemas
|
||||
ATTR_SECONDS = "seconds"
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
seek_forward:
|
||||
description: Seek forward by a set number of seconds.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name of entity for the instance of Channels to seek in.
|
||||
example: 'media_player.family_room_channels'
|
||||
|
||||
seek_backward:
|
||||
description: Seek backward by a set number of seconds.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name of entity for the instance of Channels to seek in.
|
||||
example: 'media_player.family_room_channels'
|
||||
|
||||
seek_by:
|
||||
description: Seek by an inputted number of seconds.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name of entity for the instance of Channels to seek in.
|
||||
example: 'media_player.family_room_channels'
|
||||
seconds:
|
||||
description: Number of seconds to seek by. Negative numbers seek backwards.
|
||||
example: 120
|
|
@ -157,30 +157,6 @@ shuffle_set:
|
|||
description: True/false for enabling/disabling shuffle.
|
||||
example: true
|
||||
|
||||
channels_seek_forward:
|
||||
description: Seek forward by a set number of seconds.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name of entity for the instance of Channels to seek in.
|
||||
example: 'media_player.family_room_channels'
|
||||
|
||||
channels_seek_backward:
|
||||
description: Seek backward by a set number of seconds.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name of entity for the instance of Channels to seek in.
|
||||
example: 'media_player.family_room_channels'
|
||||
|
||||
channels_seek_by:
|
||||
description: Seek by an inputted number of seconds.
|
||||
fields:
|
||||
entity_id:
|
||||
description: Name of entity for the instance of Channels to seek in.
|
||||
example: 'media_player.family_room_channels'
|
||||
seconds:
|
||||
description: Number of seconds to seek by. Negative numbers seek backwards.
|
||||
example: 120
|
||||
|
||||
soundtouch_play_everywhere:
|
||||
description: Play on all Bose Soundtouch devices.
|
||||
fields:
|
||||
|
|
Loading…
Reference in New Issue