1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00
ha-core/homeassistant/components/cert_expiry/errors.py
jjlawren df3f7687d4
Refactor Certificate Expiry Sensor (#32066)
* Cert Expiry refactor

* Unused parameter

* Reduce delay

* Deprecate 'name' config

* Use config entry unique_id

* Fix logic bugs found with tests

* Rewrite tests to use config flow core interfaces, validate created sensors

* Update strings

* Minor consistency fix

* Review fixes, complete test coverage

* Move error handling to helper

* Subclass exceptions

* Better tests

* Use first object reference

* Fix docstring
2020-03-02 07:44:24 -06:00

27 lines
635 B
Python

"""Errors for the cert_expiry integration."""
from homeassistant.exceptions import HomeAssistantError
class CertExpiryException(HomeAssistantError):
"""Base class for cert_expiry exceptions."""
class TemporaryFailure(CertExpiryException):
"""Temporary failure has occurred."""
class ValidationFailure(CertExpiryException):
"""Certificate validation failure has occurred."""
class ResolveFailed(TemporaryFailure):
"""Name resolution failed."""
class ConnectionTimeout(TemporaryFailure):
"""Network connection timed out."""
class ConnectionRefused(TemporaryFailure):
"""Network connection refused."""