Power in, power out

Hi, I have configured two entities in two wemos D1 mini (sensor.fv_potenza and sensor.home_potenza).
I’d like to create a sensor template which is the difference between them e read that value in lovelace.
I’ve tried but I can’t understand value_template syntax.
Thanks