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

Move several local services to their right domain #11677

merged 2 commits into from Jan 15, 2018


Copy link

commented Jan 15, 2018


Since #11479 we try to load services.yaml based on the domain of registered services. This has now revealed several platforms that register services outside their own domain, causing an exception during the services.yaml loading.

This PR renames the services to follow the usual convention of keeping the domain and prepending the platform to the service name:

todoist.new_task -> calendar.todoist_new_task

snapcast.snapcast_snapshot -> media_player.snapcast_snapshot
snapcast.snapcast_restore -> media_player.snapcast_restore

mopar.remote_command -> sensor.mopar_remote_command

broadlink.learn_command_192_168_0_107 -> switch.broadlink_learn_command_192_168_0_107
broadlink.send_packet_192_168_0_107 -> switch.broadlink_send_packet_192_168_0_107

The affected platforms were located with this command:

git grep -l 'register(' homeassistant/components/*/[a-z]*.py | xargs grep 'DOMAIN = '

I do not use any of these platforms so this is currently completely untested.

Related issue (if applicable): fixes #11654

Pull request in with documentation (if applicable): home-assistant/


  • The code change is tested and works locally.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully.
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/
  • New files were added to .coveragerc.
@@ -15,7 +15,8 @@

from homeassistant.util.dt import utcnow
from homeassistant.util import Throttle
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA)
from homeassistant.components.switch import (SwitchDevice, DOMAIN,

This comment has been minimized.

Copy link

houndci-bot Jan 15, 2018

continuation line under-indented for visual indent

@amelchio amelchio referenced this pull request Jan 15, 2018


Move several local services to their right domain #4424

2 of 2 tasks complete

@balloob balloob merged commit 8753469 into home-assistant:dev Jan 15, 2018

3 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
coverage/coveralls Coverage pending from
WIP ready for review
cla-bot Everyone involved has signed the CLA
hound No violations found. Woof!

balloob added a commit that referenced this pull request Jan 16, 2018

Move several local services to their right domain (#11677)
* Move several local services to their right domain

* Fix lint

@balloob balloob referenced this pull request Jan 16, 2018


0.61.1 #11716

@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.