1
mirror of https://github.com/home-assistant/core synced 2024-08-18 20:45:41 +02:00
ha-core/homeassistant/exceptions.py
Paulus Schoutsen d73b695e73 EntityComponent to retry platforms that are not ready yet (#8209)
* Add PlatformNotReady Exception

* lint

* Remove cap, adjust algorithm
2017-06-26 09:41:48 -07:00

35 lines
759 B
Python

"""The exceptions used by Home Assistant."""
class HomeAssistantError(Exception):
"""General Home Assistant exception occurred."""
pass
class InvalidEntityFormatError(HomeAssistantError):
"""When an invalid formatted entity is encountered."""
pass
class NoEntitySpecifiedError(HomeAssistantError):
"""When no entity is specified."""
pass
class TemplateError(HomeAssistantError):
"""Error during template rendering."""
def __init__(self, exception):
"""Init the error."""
super().__init__('{}: {}'.format(exception.__class__.__name__,
exception))
class PlatformNotReady(HomeAssistantError):
"""Error to indicate that platform is not ready."""
pass