Move Kodi services from 'media_player' domain to 'kodi'#25753
Conversation
|
Hey there @armills, mind taking a look at this pull request as its been labeled with a integration ( This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people. |
|
@balloob I think |
|
Are there any additional changes that need to be made? |
|
@amelchio is right. We should register the services in |
|
@balloob I'm not familiar with the HA setup functions and what should go in |
|
We should only merge this PR if we do it right, so that future PRs will build on top of the right foundation. It should be the exact same code, just be put inside |
|
OK, I'll give it a shot. If we register the services in |
|
Then we should guard that :) |
I checked this via: from homeassistant.components.media_player.const import DOMAIN as MP_DOMAIN
async def async_setup(hass, config):
"""Set up the Kodi integration."""
if any(
((CONF_PLATFORM, DOMAIN) in cfg.items() for cfg in config.get(MP_DOMAIN, []))
):
# Register the Kodi media_player servicesI tried it out and it only registers the services if there is a Kodi media player config entry. But if this is not the proper way to do it, let me know. |
| homeassistant/components/knx/* | ||
| homeassistant/components/knx/climate.py | ||
| homeassistant/components/knx/cover.py | ||
| homeassistant/components/kodi/__init__.py |
|
Great! |
|
Kodi is slowly growing up, soon we might be able to automatically discover it and set it up using a config flow? |
|
Don't forget about the corresponding documentation pull request! |
Breaking Change:
The
media_player.kodi_*services are nowkodi.*.media_player.kodi_add_to_playlistis nowkodi.add_to_playlistmedia_player.kodi_call_methodis nowkodi.call_methodDescription:
Move the Kodi services to their own domain.
Related issue (if applicable): fixes #
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#10081
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code does not interact with devices: