mirror of
https://github.com/esphome/esphome.git
synced 2026-08-17 19:13:18 +08:00
[config_validation] Fix multicast typo in error message (#17206)
This commit is contained in:
@@ -1494,9 +1494,7 @@ def ipv6address(value):
|
||||
def ipv4address_multi_broadcast(value):
|
||||
address = ipv4address(value)
|
||||
if not (address.is_multicast or (address == IPv4Address("255.255.255.255"))):
|
||||
raise Invalid(
|
||||
f"{value} is not a multicasst address nor local broadcast address"
|
||||
)
|
||||
raise Invalid(f"{value} is not a multicast address nor local broadcast address")
|
||||
return address
|
||||
|
||||
|
||||
|
||||
@@ -1926,7 +1926,7 @@ def test_ipv4address_multi_broadcast_broadcast() -> None:
|
||||
|
||||
|
||||
def test_ipv4address_multi_broadcast_invalid() -> None:
|
||||
with pytest.raises(Invalid, match="not a multicasst"):
|
||||
with pytest.raises(Invalid, match="not a multicast"):
|
||||
cv.ipv4address_multi_broadcast("192.168.0.1")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user