Yes, the problem in this topic is:
ESPHome device shows offline but connected when I check my router 
The only thing and you and the the thread starter in 2021 had in common was the use of the same hardware component (shift register). Maybe you even use a esp8266 too - we don’t know as you didn’t provide the basics (yaml etc.) needed to get a qualified answer (beside posting at the wrong location)
Again! Try the link on how to help us help you