1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-08 06:12:20 +01:00

Sun support (#531)

* Sun

* Add sun support

* Lint

* Updates

* Fix elevation

* Lint

* Update mqtt_climate.cpp
This commit is contained in:
Otto Winter
2019-05-11 12:31:00 +02:00
committed by GitHub
parent f2540bae23
commit f1a0e5a313
22 changed files with 740 additions and 66 deletions

View File

@@ -119,15 +119,14 @@ def _lookup_module(domain, is_platform):
path = 'esphome.components.{}'.format(domain)
try:
module = importlib.import_module(path)
except ImportError:
import traceback
_LOGGER.error("Unable to import component %s:", domain)
traceback.print_exc()
except ImportError as e:
if 'No module named' in str(e):
_LOGGER.error("Unable to import component %s:", domain)
else:
_LOGGER.error("Unable to import component %s:", domain, exc_info=True)
return None
except Exception: # pylint: disable=broad-except
import traceback
_LOGGER.error("Unable to load component %s:", domain)
traceback.print_exc()
_LOGGER.error("Unable to load component %s:", domain, exc_info=True)
return None
else:
manif = ComponentManifest(module, CORE_COMPONENTS_PATH, is_platform=is_platform)