Question: I'm pretty new to Raspberry and I searched the net for a while now trying to find a good and simple answer to this question.

Ok, so I have a network that is connected to the internet.
I want to start a new network for IOT devices around my workplace to do and alert me on various things.
I'm using HomeAssistant for the system, and I have a separate router for the IOT network.

My question is how can I set it all up so the Raspberry will be connected to the internet through the wifi and connected to the IOT network through the ethernet?

I heard they can't work together at the same time and I want it to either switch between them automatically or if it does work if someone can point me in the right direction of where to read or what to look for that will really help me a lot.

I run the Raspberry Pi 3 model B+.

EDIT: I posted the solution as an answer. at least what has worked for me for the last few days now.

Answer: 
Yes, it is possible. The rpi loaded with raspbian (or any other GNU/Linux based distro) can be used as a router to connect different networks, only that technically there are a number of different subjects related to *networking* that you have to be able to cope and solve in order to get it working. So... the questions:

* Do you want to set up a *new* network segment for the wired network so that the RPI and the IOT devices can see each other? The answer there is probably "yes", right?
* Will you use a dhcp service on this network segment so that all devices get automagically set up? Will the DHCP service run on the RPI? If that's the case, you will have to use dnsmasq, probably (there are other services available, like udhcpd, for example but dnsmasq also helps with the DNS set up).
* Do you want your IOT devices to be reachable to devices outside of the RPI (like, traffic coming from the wireless). This will probably require some hacking on the routing of your whole network (or at least the boxes that you want to be able to reach the IOT devices) to teach them that in order to reach network segment x.x.x.x/24 they have to throw the traffic through the rpi.
* Do you want your IOT devices to be able to reach devices outside of the IOT network **while** *not* making this network accessible to devices outside of this segment? This means you will need to set up some DNAT or masquerade on the RPI.
If the 2 networks have `DHCP` servers (operating on their own network - using multiple `DHCP` servers on a single network is problematical) then the Pi should obtain the necessary configuration parameters, then it should work.

No additional configuration should be required if using the default `dhcpcd` network manager. `route` will show the final routing. If this cannot be done automatically then you may need to manually configure the routing table as suggested by goldilocks - this is more involved, as the table is normally automatically configured and will overwrite manual configuration.