Using a entity as filter bound

Hi all, i need some help setting up a Filter. I trie to use a entity as the upper bound, but don’t get it running. This is how i tried:

  - platform: filter
    name: "Strobl_Green_Energy_charging_Min_Max"
    unique_id: strobl_green_energy_charging_min_max
    entity_id: sensor.strobl_green_energy_charging
      - filter: range
        upper_bound: "{{ states('sensor.myenergi_strobelhof_power_ct_internal_load')}}"
        lower_bound: 0

but i get:

What is wrong?

That configuration key only accepts floats not templates, as specified in the docs: