Shelly Cloud - new Component? How to implement it? API is available

With this script energy sensor is in kWh. But Shellies reset this meter on every reboot. You can use power sensor, integration sensor and utility_meter:

sensor:
  - platform: integration
    source: sensor.shelly2_5b2604_power
    name: 'Shelly Energy'
    unit_prefix: k
    round: 2

utility_meter:
  energy_shelly2_monthly:
    source: sensor.shelly_energy
    cycle: monthly