Besides assigning IP addresses you need to check routing (or forwarding); yes, even if you are just running a host without forwarding traffic between networks, the routing table is involved in finding the proper next hop -- and thus network interface -- to take towards a particular destination address.
Since you have not given details about your specific setup with respect to not only IP addresses, but also netmasks, and the default route(s), it's not really possible at this stage to diagnose your problem.
You can show the routes that your host uses using the ip -4 route show
command. I suspect that you may have either have more than a single default route, or may have assigned the same subnet to both Wifi and Ethernet interfaces (with consequences you don't want, see below).
An (IP) subnet is formed by doing a binary AND of an IP address and the associated netmask. For instance, 192.168.0.1 AND 255.255.255.0 gives 192.168.0.0 as the subnet.
While there are perfectly valid cases where the same IP subnet gets assigned to more than a single interface, I doubt this is what you want to do in your case. In this case the Ethernet interface gets a better so-called metric, because it's deemed "better". In consequence, all your outgoing traffic to the same subnet takes the black-hole Ethernet interface from which it will never reach your Internet router, which is reachable trough the WiFi interface instead.
You'll need to assign a separate IP subnet to the devices that are connected to your Ethernet switch. If your main subnet is 192.168.0.0, then you make use 192.168.1.0 (same netmask 255.255.255.0).
If you in fact assigned the same subnet to both interfaces, ip -4 route show
should give you two routes to 192.168.0.0/255.255.255.0 (assuming my example), but one going through WiFi, while the other one goes to Ethernet.
Metric
inroute
.