diff --git a/homeassistant/components/lyric/manifest.json b/homeassistant/components/lyric/manifest.json index 71976fa2ac1..6317c6c3357 100644 --- a/homeassistant/components/lyric/manifest.json +++ b/homeassistant/components/lyric/manifest.json @@ -10,15 +10,15 @@ "dhcp": [ { "hostname": "lyric-*", - "macaddress": "48A2E6" + "macaddress": "48A2E6*" }, { "hostname": "lyric-*", - "macaddress": "B82CA0" + "macaddress": "B82CA0*" }, { "hostname": "lyric-*", - "macaddress": "00D02D" + "macaddress": "00D02D*" } ], "iot_class": "cloud_polling" diff --git a/homeassistant/generated/dhcp.py b/homeassistant/generated/dhcp.py index 4bead617dcb..0fa1777d2a4 100644 --- a/homeassistant/generated/dhcp.py +++ b/homeassistant/generated/dhcp.py @@ -75,17 +75,17 @@ DHCP = [ { "domain": "lyric", "hostname": "lyric-*", - "macaddress": "48A2E6" + "macaddress": "48A2E6*" }, { "domain": "lyric", "hostname": "lyric-*", - "macaddress": "B82CA0" + "macaddress": "B82CA0*" }, { "domain": "lyric", "hostname": "lyric-*", - "macaddress": "00D02D" + "macaddress": "00D02D*" }, { "domain": "myq", diff --git a/script/hassfest/manifest.py b/script/hassfest/manifest.py index ac9ab516dd1..8b3489facf6 100644 --- a/script/hassfest/manifest.py +++ b/script/hassfest/manifest.py @@ -148,6 +148,13 @@ def verify_version(value: str): return value +def verify_wildcard(value: str): + """Verify the matcher contains a wildcard.""" + if "*" not in value: + raise vol.Invalid(f"'{value}' needs to contain a wildcard matcher") + return value + + MANIFEST_SCHEMA = vol.Schema( { vol.Required("domain"): str, @@ -160,7 +167,9 @@ MANIFEST_SCHEMA = vol.Schema( vol.Schema( { vol.Required("type"): str, - vol.Optional("macaddress"): vol.All(str, verify_uppercase), + vol.Optional("macaddress"): vol.All( + str, verify_uppercase, verify_wildcard + ), vol.Optional("manufacturer"): vol.All(str, verify_lowercase), vol.Optional("name"): vol.All(str, verify_lowercase), } @@ -174,7 +183,9 @@ MANIFEST_SCHEMA = vol.Schema( vol.Optional("dhcp"): [ vol.Schema( { - vol.Optional("macaddress"): vol.All(str, verify_uppercase), + vol.Optional("macaddress"): vol.All( + str, verify_uppercase, verify_wildcard + ), vol.Optional("hostname"): vol.All(str, verify_lowercase), } )