Please help with sensor attributes

Can’t get an attribute with a name from more than one word.

photo_2020-08-16_23-31-31

    sa_battery:
      friendly_name: Sa battery
      value_template: >-
        {{ state_attr('sensor.sa', 'battery level') }}

    sa_sn:
      friendly_name: Sa SN
      value_template: >-
        {{ state_attr('sensor.sa', 'sn') }}

In first template got ‘unknown’, in second - ‘672940’

Try battery_level

1 Like

It’s works… Thank you! But - WHY?!

Because spaces are replaced by underscore (or the other way, depending on how you look at it)