Template sensor coming in as text, not value

The template sensor I created below is coming through seemingly as text, not a value. Any suggestions so I can get this to a value so I can plot it on a line graph?

Thanks in advance!

sensor:
  - platform: template
    sensors:
      therm_battery_office1:
        value_template: "{{ state_attr('sensor.officethermometer_temp', 'battery_level') | int }} %"

Add a unit_of_measurement:

2 Likes

Worked swimmingly. Thank you so much!

1 Like