BMW ConnectedDrive component

I am not sure how the name: parameter is determined, but i found for my car “330i” worked but “bmw” did not. This is important, as entities with names starting with numbers are handled differently. See:

In my case, I found this did not work:

    data:
      message: "{{ states.sensor.330i_remaining_range_fuel.state }} km"

Whereas this did:

    data:
      message: "{{ states.sensor['330i_remaining_range_fuel'].state }} km"

What are the rules on the name: parameter in the setup?