Reading and displaying relay state using nodemcu

Even in the forum there are some topics that covers this.

Check this → Led indicator widget on boolean variables?

Hope it helps.