Support variables in a Template Trigger

It would be very useful if a variable could be used in a Template Trigger.

Currently (0.118.X) the following automation fails to be triggered.

- alias: test
    inputs: >
      {{ expand('group.input_booleans') 
         | selectattr('state', 'eq', 'on')
         | map(attribute='name') | list }}
    platform: template
    value_template: "{{ inputs | count > 0 }}"
    service: persistent_notification.create
      title: 'Test'
      message: "{{ inputs | join(', ') }}"

Manually triggering the automation results in a notification containing the value of inputs. In other words, the variable is correctly defined, and contains a list, but it fails to be understood within the trigger.