Update service domain for epson from 'media_player' to 'epson' (#29113)

* update .coveragerc, move epson constants to const.py, move epson cutsom service to epson domain

* Newline in services.yaml
This commit is contained in:
Raman Gupta 2019-11-26 14:12:50 -05:00 committed by Paulus Schoutsen
parent 9e01591cac
commit c21650473a
5 changed files with 28 additions and 19 deletions

View file

@ -199,6 +199,7 @@ omit =
homeassistant/components/envirophat/sensor.py
homeassistant/components/envisalink/*
homeassistant/components/ephember/climate.py
homeassistant/components/epson/const.py
homeassistant/components/epson/media_player.py
homeassistant/components/epsonworkforce/sensor.py
homeassistant/components/eq3btsmart/climate.py

View file

@ -0,0 +1,10 @@
"""Constants for the Epson projector component."""
DOMAIN = "epson"
SERVICE_SELECT_CMODE = "select_cmode"
ATTR_CMODE = "cmode"
DATA_EPSON = "epson"
DEFAULT_NAME = "EPSON Projector"
SUPPORT_CMODE = 33001

View file

@ -29,7 +29,6 @@ import epson_projector as epson
from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA
from homeassistant.components.media_player.const import (
DOMAIN,
SUPPORT_NEXT_TRACK,
SUPPORT_PREVIOUS_TRACK,
SUPPORT_SELECT_SOURCE,
@ -49,17 +48,17 @@ from homeassistant.const import (
)
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv
from .const import (
ATTR_CMODE,
DATA_EPSON,
DEFAULT_NAME,
DOMAIN,
SERVICE_SELECT_CMODE,
SUPPORT_CMODE,
)
_LOGGER = logging.getLogger(__name__)
ATTR_CMODE = "cmode"
DATA_EPSON = "epson"
DEFAULT_NAME = "EPSON Projector"
SERVICE_SELECT_CMODE = "epson_select_cmode"
SUPPORT_CMODE = 33001
SUPPORT_EPSON = (
SUPPORT_TURN_ON
| SUPPORT_TURN_OFF

View file

@ -0,0 +1,9 @@
select_cmode:
description: Select Color mode of Epson projector
fields:
entity_id:
description: Name of projector
example: 'media_player.epson_projector'
cmode:
description: Name of Cmode
example: 'cinema'

View file

@ -257,13 +257,3 @@ songpal_set_sound_setting:
value:
description: Value to set.
example: 'on'
epson_select_cmode:
description: Select Color mode of Epson projector
fields:
entity_id:
description: Name of projector
example: 'media_player.epson_projector'
cmode:
description: Name of Cmode
example: 'cinema'