diff --git a/.coveragerc b/.coveragerc index 91b856dc6d8..f1ba55054b5 100644 --- a/.coveragerc +++ b/.coveragerc @@ -284,7 +284,7 @@ omit = homeassistant/components/hangouts/hangouts_bot.py homeassistant/components/hangouts/hangups_utils.py homeassistant/components/harman_kardon_avr/media_player.py - homeassistant/components/harmony/remote.py + homeassistant/components/harmony/* homeassistant/components/haveibeenpwned/sensor.py homeassistant/components/hdmi_cec/* homeassistant/components/heatmiser/climate.py diff --git a/homeassistant/components/harmony/const.py b/homeassistant/components/harmony/const.py new file mode 100644 index 00000000000..12e71050665 --- /dev/null +++ b/homeassistant/components/harmony/const.py @@ -0,0 +1,4 @@ +"""Constants for the Harmony component.""" +DOMAIN = "harmony" +SERVICE_SYNC = "sync" +SERVICE_CHANGE_CHANNEL = "change_channel" diff --git a/homeassistant/components/harmony/remote.py b/homeassistant/components/harmony/remote.py index d5c1c2d82bc..7f4d03ccbb0 100644 --- a/homeassistant/components/harmony/remote.py +++ b/homeassistant/components/harmony/remote.py @@ -19,7 +19,6 @@ from homeassistant.components.remote import ( ATTR_HOLD_SECS, ATTR_NUM_REPEATS, DEFAULT_DELAY_SECS, - DOMAIN, PLATFORM_SCHEMA, ) from homeassistant.const import ( @@ -33,6 +32,8 @@ from homeassistant.exceptions import PlatformNotReady import homeassistant.helpers.config_validation as cv from homeassistant.util import slugify +from .const import DOMAIN, SERVICE_CHANGE_CHANNEL, SERVICE_SYNC + _LOGGER = logging.getLogger(__name__) ATTR_CHANNEL = "channel" @@ -42,9 +43,6 @@ DEFAULT_PORT = 8088 DEVICES = [] CONF_DEVICE_CACHE = "harmony_device_cache" -SERVICE_SYNC = "harmony_sync" -SERVICE_CHANGE_CHANNEL = "harmony_change_channel" - PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { vol.Optional(ATTR_ACTIVITY): cv.string, diff --git a/homeassistant/components/harmony/services.yaml b/homeassistant/components/harmony/services.yaml index e69de29bb2d..1b9ae225c7f 100644 --- a/homeassistant/components/harmony/services.yaml +++ b/homeassistant/components/harmony/services.yaml @@ -0,0 +1,16 @@ +sync: + description: Syncs the remote's configuration. + fields: + entity_id: + description: Name(s) of entities to sync. + example: 'remote.family_room' + +change_channel: + description: Sends change channel command to the Harmony HUB + fields: + entity_id: + description: Name(s) of Harmony remote entities to send change channel command to + example: 'remote.family_room' + channel: + description: Channel number to change to + example: '200' \ No newline at end of file diff --git a/homeassistant/components/remote/services.yaml b/homeassistant/components/remote/services.yaml index a551ba18ed4..f728b5033c8 100644 --- a/homeassistant/components/remote/services.yaml +++ b/homeassistant/components/remote/services.yaml @@ -65,24 +65,6 @@ learn_command: description: Timeout, in seconds, for the command to be learned. example: '30' - -harmony_sync: - description: Syncs the remote's configuration. - fields: - entity_id: - description: Name(s) of entities to sync. - example: 'remote.family_room' - -harmony_change_channel: - description: Sends change channel command to the Harmony HUB - fields: - entity_id: - description: Name(s) of Harmony remote entities to send change channel command to - example: 'remote.family_room' - channel: - description: Channel number to change to - example: '200' - xiaomi_miio_learn_command: description: 'Learn an IR command, press "Call Service", point the remote at the IR device, and the learned command will be shown as a notification in Overview.' fields: