mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Have Notify platform install platform dependencies
This commit is contained in:
parent
88f3a5a50a
commit
04bb7ed58f
@ -10,6 +10,7 @@ from functools import partial
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import homeassistant.bootstrap as bootstrap
|
||||||
from homeassistant.config import load_yaml_config_file
|
from homeassistant.config import load_yaml_config_file
|
||||||
from homeassistant.loader import get_component
|
from homeassistant.loader import get_component
|
||||||
from homeassistant.helpers import config_per_platform
|
from homeassistant.helpers import config_per_platform
|
||||||
@ -45,8 +46,8 @@ def setup(hass, config):
|
|||||||
|
|
||||||
for platform, p_config in config_per_platform(config, DOMAIN, _LOGGER):
|
for platform, p_config in config_per_platform(config, DOMAIN, _LOGGER):
|
||||||
# get platform
|
# get platform
|
||||||
notify_implementation = get_component(
|
notify_implementation = bootstrap.prepare_setup_platform(
|
||||||
'notify.{}'.format(platform))
|
hass, config, DOMAIN, platform)
|
||||||
|
|
||||||
if notify_implementation is None:
|
if notify_implementation is None:
|
||||||
_LOGGER.error("Unknown notification service specified.")
|
_LOGGER.error("Unknown notification service specified.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user