[core] Read the mqtt IP discovery flag without importing the mqtt component (#18066)

This commit is contained in:
J. Nick Koston
2026-08-04 15:12:57 -05:00
committed by GitHub
parent 79a305d69a
commit d47acf5d0b
6 changed files with 46 additions and 4 deletions
+8
View File
@@ -3257,6 +3257,14 @@ def test_get_port_type() -> None:
assert get_port_type("BOOTSEL") == "BOOTSEL"
def test_mqtt_reexports_discover_ip() -> None:
"""The old import path must keep working for external code."""
from esphome.components import mqtt
from esphome.const import CONF_DISCOVER_IP
assert mqtt.CONF_DISCOVER_IP is CONF_DISCOVER_IP
def test_has_mqtt_ip_lookup() -> None:
"""Test has_mqtt_ip_lookup function."""