Multiple template error

I’m trying ad add multiple templates into my config file but get this error:

2021-12-14 13:03:08 ERROR (MainThread) [homeassistant.config] Invalid config for [template]: invalid template (TemplateSyntaxError: expected token 'name', got '/') for dictionary value @ data['sensor'][1]['state']. Got "{{ states('sensor.cp1500_battery_runtime') | / 60 }}". (See /config/configuration.yaml, line 29).

The template:

template:
  - sensor:
      - name: "pocket money"
        unit_of_measurement: "£"
        state: "{{ states('input_number.pocket_money') | round(2) }}"
      - name: "UPS runtime"
        unit_of_measurement: "m"
        state: "{{ states('sensor.cp1500_battery_runtime') | / 60 }}"

Where am I going wrong?

TIA

You’re filtering nothing and the dividing nothing by 60. I’m assuming you want int between the | and /.

1 Like

ah, thanks for that.