Use DhcpServiceInfo in screenlogic (#60103)

This commit is contained in:
epenet 2021-11-21 23:33:26 +01:00 committed by GitHub
parent 4555820987
commit 8f7f32d844
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View file

@ -11,7 +11,7 @@ from screenlogicpy.const import (
)
from homeassistant import config_entries
from homeassistant.components.dhcp import HOSTNAME, IP_ADDRESS
from homeassistant.components import dhcp
from homeassistant.components.screenlogic.config_flow import (
GATEWAY_MANUAL_ENTRY,
GATEWAY_SELECT_KEY,
@ -138,10 +138,10 @@ async def test_dhcp(hass):
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_DHCP},
data={
HOSTNAME: "Pentair: 01-01-01",
IP_ADDRESS: "1.1.1.1",
},
data=dhcp.DhcpServiceInfo(
hostname="Pentair: 01-01-01",
ip="1.1.1.1",
),
)
assert result["type"] == "form"