Make sensor zero line

Hello,

I would like to make a zero-line in my graphs because the values are postive and negative and was planning to do this by plotting a zero line from a sensor. Could somebody help me with the yaml code for making the sensor.zero? I think i have to use the sensor template? Thanks in advance.

Not sure if you can make sensors more simply but this will work.

template:
  - sensor:
      - name: Zero Line
        state: '0'