Skip to content

Commit

Permalink
Scene validator fix (#21362)
Browse files Browse the repository at this point in the history
  • Loading branch information
yosilevy authored and Danielhiversen committed Feb 23, 2019
1 parent c595cf0 commit e8b67fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion homeassistant/components/scene/__init__.py
Expand Up @@ -32,7 +32,12 @@ def _platform_validator(config):
'homeassistant.components.scene.{}'.format(
config[CONF_PLATFORM]))
except ImportError:
raise vol.Invalid('Invalid platform specified') from None
try:
platform = importlib.import_module(
'homeassistant.components.{}.scene'.format(
config[CONF_PLATFORM]))
except ImportError:
raise vol.Invalid('Invalid platform specified') from None

if not hasattr(platform, 'PLATFORM_SCHEMA'):
return config
Expand Down

0 comments on commit e8b67fc

Please sign in to comment.