Sonoff S31 with ESPHome

Hello,

This is the first time I want to configure device with Energy monitoring. I would really appreciate if you take a look at my config and tell me if I am missing something. Will it work?

Am I getting all possible information about my S31 with this script? It looks like I can get information about Voltage, Current and Power. Can I get something else?

esphome:
  name: sonoff_basic_2
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "MYSSID"
  password: "MyPassword"

# Enable logging
logger:
  level: Verbose

uart:
  rx_pin: RX
  baud_rate: 4800

# Enable Home Assistant API
api:

ota:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "Sonoff 2 Button"
    on_press:
      - switch.toggle: relay

switch:
  - platform: gpio
    name: "Sonoff 2 Relay"
    pin: GPIO12
    id: relay

sensor:
  - platform: cse7766
    update_interval: 2s
    current:
      name: "Sonoff 2 Current"
    voltage:
      name: "Sonoff 2 Voltage"
    power:
      name: "Sonoff 2 Power"

status_led:
  pin:
    number: GPIO13
    inverted: yes

Thank you, I use something very similar.

I have one issue that I am not happy about. The WiFi LED does not work right. Before ESPHome, it would stay up if there is a WiFi connection. Now, WiFi LED blinks while connecting to WiFi and stays off after that. Is it possible to fix? Some people say that this portion of the code is for this, but it does not work:

status_led:
  pin:
    number: GPIO13
    inverted: yes

Remove the inverted: yes.
This basically tells it to interpret on and off and off as on.
Remove it and it should reverse the light - it will still blink when connecting, but should stay on once connected (I believe this is what you requested).

Cheers!
DeadEnd

That did it! Thank you very much to everyone!!