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.