Align zeroconf matching with ZeroconfServiceInfo (#62133)
This commit is contained in:
@@ -12,6 +12,8 @@ from awesomeversion import (
|
||||
import voluptuous as vol
|
||||
from voluptuous.humanize import humanize_error
|
||||
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
|
||||
from .model import Config, Integration
|
||||
|
||||
DOCUMENTATION_URL_SCHEMA = "https"
|
||||
@@ -180,16 +182,26 @@ MANIFEST_SCHEMA = vol.Schema(
|
||||
vol.Optional("zeroconf"): [
|
||||
vol.Any(
|
||||
str,
|
||||
vol.Schema(
|
||||
{
|
||||
vol.Required("type"): str,
|
||||
vol.Optional("macaddress"): vol.All(
|
||||
str, verify_uppercase, verify_wildcard
|
||||
),
|
||||
vol.Optional("manufacturer"): vol.All(str, verify_lowercase),
|
||||
vol.Optional("model"): vol.All(str, verify_lowercase),
|
||||
vol.Optional("name"): vol.All(str, verify_lowercase),
|
||||
}
|
||||
vol.All(
|
||||
cv.deprecated("macaddress"),
|
||||
cv.deprecated("model"),
|
||||
cv.deprecated("manufacturer"),
|
||||
vol.Schema(
|
||||
{
|
||||
vol.Required("type"): str,
|
||||
vol.Optional("macaddress"): vol.All(
|
||||
str, verify_uppercase, verify_wildcard
|
||||
),
|
||||
vol.Optional("manufacturer"): vol.All(
|
||||
str, verify_lowercase
|
||||
),
|
||||
vol.Optional("model"): vol.All(str, verify_lowercase),
|
||||
vol.Optional("name"): vol.All(str, verify_lowercase),
|
||||
vol.Optional("properties"): vol.Schema(
|
||||
{str: verify_lowercase}
|
||||
),
|
||||
}
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user