Esphome energy monitor. The link you provided is for board that control relays.

Esphome energy monitor. Clone the source from my repo.