mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Move device info validation to device registry (#96465)
* Move device info validation to device registry * Don't move DeviceInfo * Fix type annotation * Don't block adding device for unknown config entry * Fix test * Remove use of locals() * Improve error message
This commit is contained in:
@@ -191,21 +191,6 @@ class MaxLengthExceeded(HomeAssistantError):
|
||||
self.max_length = max_length
|
||||
|
||||
|
||||
class RequiredParameterMissing(HomeAssistantError):
|
||||
"""Raised when a required parameter is missing from a function call."""
|
||||
|
||||
def __init__(self, parameter_names: list[str]) -> None:
|
||||
"""Initialize error."""
|
||||
super().__init__(
|
||||
self,
|
||||
(
|
||||
"Call must include at least one of the following parameters: "
|
||||
f"{', '.join(parameter_names)}"
|
||||
),
|
||||
)
|
||||
self.parameter_names = parameter_names
|
||||
|
||||
|
||||
class DependencyError(HomeAssistantError):
|
||||
"""Raised when dependencies cannot be setup."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user