Advice for Power Usage Sensor

My utility meter reports in reports kWh. I would like to get my ~current usage in Watts. The math is:

(current_val_kWh - previous_val_kWh) / ((current_val_time_seconds - previous_val_time_seconds)*3600)

The previous_val is the last value that was not the current value.
Is there an easy way to do this using a template sensor or do I need to write a custom component?

Use the statistics sensor on your energy sensor:

The attribute change_rate of the sensor will be equivalent to power.