mirror of
https://github.com/esphome/esphome.git
synced 2025-03-14 06:38:17 +00:00
Print better error message when loader fails with ValueError
This commit is contained in:
parent
7ce753b76f
commit
7fb1979f16
@ -30,6 +30,8 @@ def get_component(domain):
|
||||
module = importlib.import_module(path)
|
||||
except ImportError as err:
|
||||
_LOGGER.debug(err)
|
||||
except ValueError:
|
||||
raise ESPHomeYAMLError("Error finding component '{}'.".format(domain))
|
||||
else:
|
||||
_COMPONENT_CACHE[domain] = module
|
||||
return module
|
||||
|
Loading…
x
Reference in New Issue
Block a user