mirror of
https://github.com/esphome/esphome.git
synced 2024-12-29 00:41:44 +01:00
Dont do mqtt ip lookup if use_address
has ip address (#5096)
* Dont do mqtt ip lookup id `use_address` is in config * Fix after actually testing =)
This commit is contained in:
parent
3ba2a29e54
commit
d7945de001
1 changed files with 5 additions and 3 deletions
|
@ -32,7 +32,7 @@ from esphome.const import (
|
|||
SECRETS_FILES,
|
||||
)
|
||||
from esphome.core import CORE, EsphomeError, coroutine
|
||||
from esphome.helpers import indent
|
||||
from esphome.helpers import indent, is_ip_address
|
||||
from esphome.util import (
|
||||
run_external_command,
|
||||
run_external_process,
|
||||
|
@ -308,8 +308,10 @@ def upload_program(config, args, host):
|
|||
password = ota_conf.get(CONF_PASSWORD, "")
|
||||
|
||||
if (
|
||||
get_port_type(host) == "MQTT" or config[CONF_MDNS][CONF_DISABLED]
|
||||
) and CONF_MQTT in config:
|
||||
not is_ip_address(CORE.address)
|
||||
and (get_port_type(host) == "MQTT" or config[CONF_MDNS][CONF_DISABLED])
|
||||
and CONF_MQTT in config
|
||||
):
|
||||
from esphome import mqtt
|
||||
|
||||
host = mqtt.get_esphome_device_ip(
|
||||
|
|
Loading…
Reference in a new issue