Making My Own Sensor For Solar Export Automation

I have an automation which turns on a heater. This is based on there being zero energy draw from the grid. As it’s a 1kW heater it would be better if it were based on over 1kW going back to the grid.
I have a smart meter with Hildebrand Glow IHD/CAD and also Solar Edge but I can’t find a sensor on those which has live/ current solar export. The export one is a daily running total.
I thought I could make a template and then use this in a YAML script and so this is what I’ve done so far.
found two sensors, one for live grid power and one for live solar generation
entered this into Developer - Template

- platform: template
       friendly_name: Live Excess Solar
         - sensor.75a_saltburn_current_power
         - sensor.75a_saltburn_power_consumption
       value_template: "{{ (states('sensor.75a_saltburn_power_consumption')|float - states('sensor.75a_saltburn_current_power')|float/1000)|round(1) }}"
      unit_of_measurement: "kW"

I then told config to include scripts and added the above to script file.

I expected to see a sensor called live_energy_export but I can’t see it anywhere. No errors reported running config.
Any ideas what I’ve done wrong. I know, it’s probably everything :slight_smile: