diff --git a/.coveragerc b/.coveragerc index 06a106f1f66..e859e05f6ee 100644 --- a/.coveragerc +++ b/.coveragerc @@ -637,7 +637,7 @@ omit = homeassistant/components/somfy/* homeassistant/components/somfy_mylink/* homeassistant/components/sonarr/sensor.py - homeassistant/components/songpal/media_player.py + homeassistant/components/songpal/* homeassistant/components/sonos/* homeassistant/components/sony_projector/switch.py homeassistant/components/spc/* diff --git a/homeassistant/components/media_player/services.yaml b/homeassistant/components/media_player/services.yaml index 8b7614ddfdb..f30848e0078 100644 --- a/homeassistant/components/media_player/services.yaml +++ b/homeassistant/components/media_player/services.yaml @@ -243,17 +243,3 @@ yamaha_enable_output: enabled: description: Boolean indicating if port should be enabled or not. example: true - -songpal_set_sound_setting: - description: Change sound setting. - - fields: - entity_id: - description: Target device. - example: 'media_player.my_soundbar' - name: - description: Name of the setting. - example: 'nightMode' - value: - description: Value to set. - example: 'on' diff --git a/homeassistant/components/songpal/const.py b/homeassistant/components/songpal/const.py new file mode 100644 index 00000000000..6a19e316a9f --- /dev/null +++ b/homeassistant/components/songpal/const.py @@ -0,0 +1,3 @@ +"""Constants for the Songpal component.""" +DOMAIN = "songpal" +SET_SOUND_SETTING = "set_sound_setting" diff --git a/homeassistant/components/songpal/media_player.py b/homeassistant/components/songpal/media_player.py index 0567cd0ea6a..681c97a7710 100644 --- a/homeassistant/components/songpal/media_player.py +++ b/homeassistant/components/songpal/media_player.py @@ -15,7 +15,6 @@ from songpal import ( from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA from homeassistant.components.media_player.const import ( - DOMAIN, SUPPORT_SELECT_SOURCE, SUPPORT_TURN_OFF, SUPPORT_TURN_ON, @@ -33,6 +32,8 @@ from homeassistant.const import ( from homeassistant.exceptions import PlatformNotReady import homeassistant.helpers.config_validation as cv +from .const import DOMAIN, SET_SOUND_SETTING + _LOGGER = logging.getLogger(__name__) CONF_ENDPOINT = "endpoint" @@ -42,8 +43,6 @@ PARAM_VALUE = "value" PLATFORM = "songpal" -SET_SOUND_SETTING = "songpal_set_sound_setting" - SUPPORT_SONGPAL = ( SUPPORT_VOLUME_SET | SUPPORT_VOLUME_STEP diff --git a/homeassistant/components/songpal/services.yaml b/homeassistant/components/songpal/services.yaml index e69de29bb2d..8cf1a664276 100644 --- a/homeassistant/components/songpal/services.yaml +++ b/homeassistant/components/songpal/services.yaml @@ -0,0 +1,13 @@ +set_sound_setting: + description: Change sound setting. + + fields: + entity_id: + description: Target device. + example: 'media_player.my_soundbar' + name: + description: Name of the setting. + example: 'nightMode' + value: + description: Value to set. + example: 'on'