Moving things from config to helpers - how to?

I like doing things in the UI and now attempting to move some of the sensors from config yaml to template sensor helpers. Since I know close to nothing about templating, I have immediately run into an issue.

I have this sensor

sensor:
  - platform: integration
    name: Grid Import Energy
    source: sensor.grid_import_power
    unit_prefix: k
    unit_time: h
    method: left

I did this

But how do I set the “method: left”?

Thanks.

You didn’t post the entire sensor code, but I guess it is a Riemann sum integral sensor, not a template sensor. It uses a different helper, where you can select left Riemann as a type.

Thanks, you are right, forgot a couple of lines. Updated above and checking out other helpers.

A note: when you create a new sensor through a helper, it will very likely start from 0 again. That may be a reason to reconsider.

Right, I just realized it.
And no simple way around it I assume? Will have to be some db manipulations?

Thanks for the link. I’ll stick to what I have :see_no_evil: