Electric Consumption value to Text on/off

I am using a smart plug for our electric fireplace stand. I want to utilize the smart plug electric consumption to tell if the fireplace is running or not. I’ve tried creating template where if the value is higher than 5 would display On. It would be easier if I could use on/off for when the fireplace is running and just be able to keep the smart plug always on for the wife.

template:
  - sensor:
      - name: "Fireplace Status"
        state: >
          {% if states("sensor.fireplace_electric_consumption_w", 'W')|float == 0  %}
            No Power
          {% elif states("sensor.fireplace_electric_consumption_w", 'W')|float <= 5 %}
            Off
          {% elif states("sensor.fireplace_electric_consumption_w", 'W')|float >= 5 %}
            On
          {% else %}
            Unavailable
          {% endif %}

Tried to mirror the kettle template example but is not working for me at least. Appreciate any assistance.

So after several hours of trials and errors, I was able to get it working.

- platform: template
  sensors:
    fireplace_status:
      friendly_name: 'Fireplace Status'
      value_template: >-
        {% if states('sensor.fireplace_electric_consumption_w') | float > 5 %}
          On
        {% elif states('sensor.fireplace_electric_consumption_w') | float == 0 %}
          No Power
        {% else %}
          Off
        {% endif %}

Sharing to help any future peeps.