Network Devices

I don’t know if this is the correct category to post this question. I am completely new to the whole subject, but trying my best. So I have a raspberry pi running home assistant and a few esp8266 around the house with various sensors and relays on them. One of them is far away and doesn’t get signal from my router, so I thought I’d use an esp as a wifi extender and change my setup and divert all the traffic to my raspberry pi instead of the router but I still need my raspberry to be connected to the internet for cloud control of my automation. So I am currently on case 1 and I want case 2, any links to follow?