mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Abort forked-daapd zeroconf flow if version < 27 (#35709)
* Change MediaPlayerDevice to MediaPlayerEntity * Abort zeroconf if mtd-version < 27.0
This commit is contained in:
parent
71d41cbb71
commit
47801e7350
@ -158,7 +158,7 @@ class ForkedDaapdFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
"""Prepare configuration for a discovered forked-daapd device."""
|
||||
if not (
|
||||
discovery_info.get("properties")
|
||||
and discovery_info["properties"].get("mtd-version")
|
||||
and float(discovery_info["properties"].get("mtd-version", 0)) >= 27.0
|
||||
and discovery_info["properties"].get("Machine Name")
|
||||
):
|
||||
return self.async_abort(reason="not_forked_daapd")
|
||||
|
@ -103,7 +103,7 @@ async def test_zeroconf_updates_title(hass, config_entry):
|
||||
discovery_info = {
|
||||
"host": "192.168.1.1",
|
||||
"port": 23,
|
||||
"properties": {"mtd-version": 1, "Machine Name": "zeroconf_test"},
|
||||
"properties": {"mtd-version": 27.0, "Machine Name": "zeroconf_test"},
|
||||
}
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": SOURCE_ZEROCONF}, data=discovery_info
|
||||
@ -143,7 +143,7 @@ async def test_config_flow_zeroconf_valid(hass):
|
||||
"host": "192.168.1.1",
|
||||
"port": 23,
|
||||
"properties": {
|
||||
"mtd-version": 1,
|
||||
"mtd-version": 27.0,
|
||||
"Machine Name": "zeroconf_test",
|
||||
"Machine ID": "5E55EEFF",
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user