mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Fix '--device MQTT' for devices with static IP (#8535)
This commit is contained in:
		| @@ -375,10 +375,12 @@ def upload_program(config, args, host): | ||||
|     password = ota_conf.get(CONF_PASSWORD, "") | ||||
|  | ||||
|     if ( | ||||
|         not is_ip_address(CORE.address)  # pylint: disable=too-many-boolean-expressions | ||||
|         and (get_port_type(host) == "MQTT" or config[CONF_MDNS][CONF_DISABLED]) | ||||
|         and CONF_MQTT in config | ||||
|         CONF_MQTT in config  # pylint: disable=too-many-boolean-expressions | ||||
|         and (not args.device or args.device in ("MQTT", "OTA")) | ||||
|         and ( | ||||
|             ((config[CONF_MDNS][CONF_DISABLED]) and not is_ip_address(CORE.address)) | ||||
|             or get_port_type(host) == "MQTT" | ||||
|         ) | ||||
|     ): | ||||
|         from esphome import mqtt | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user