mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Fix formatting of mac addresses from dhcp discovery mocking in flux_led (#110568)
dhcp returns addresses in lowercase without :
This commit is contained in:
parent
a87960a323
commit
08f97d66ff
@ -28,6 +28,7 @@ from homeassistant.components.flux_led.const import DOMAIN
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_HOST, CONF_NAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.device_registry import format_mac
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
@ -50,7 +51,7 @@ DEFAULT_ENTRY_TITLE = f"{MODEL_DESCRIPTION} {SHORT_MAC_ADDRESS}"
|
||||
DHCP_DISCOVERY = dhcp.DhcpServiceInfo(
|
||||
hostname=MODEL,
|
||||
ip=IP_ADDRESS,
|
||||
macaddress=MAC_ADDRESS,
|
||||
macaddress=format_mac(MAC_ADDRESS).replace(":", ""),
|
||||
)
|
||||
FLUX_DISCOVERY_PARTIAL = FluxLEDDiscovery(
|
||||
ipaddr=IP_ADDRESS,
|
||||
|
@ -402,7 +402,7 @@ async def test_discovered_by_discovery_and_dhcp(hass: HomeAssistant) -> None:
|
||||
data=dhcp.DhcpServiceInfo(
|
||||
hostname="any",
|
||||
ip=IP_ADDRESS,
|
||||
macaddress="00:00:00:00:00:00",
|
||||
macaddress="000000000000",
|
||||
),
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
Loading…
x
Reference in New Issue
Block a user