Note: This is a fork from TheSDTM/esphome-SDM-energy-meter project, for more info check is project.
Currently I am using Home Assistant with multiple ESPHome sensors.
With the help of the TheSDTM project, I implemented my SDM230 as a ESPHome device.
Following the steps of TheSDTM, I am using HardwareSerial to read the data. Rememeber you will need to convert the RS485 protocol to UART TTL.
Since I have a SDM230 I addapted the project to it and to my needs.
You can use the ESPHome guide to custom sensors to get further informations on how this works: https://esphome.io/components/sensor/custom.html
Best Regards, José Ferreira