Template sensor with attributes

I cant figure out if and how to give attributes of an template sensor things like unit_of_messurement or or similar things what I can do for sensor itself.
There are no examples somewhere.
Take the following template sensor:

template:
  - binary_sensor:
      name: Apple Watch Lukas
      icon: >
        {% if is_state('binary_sensor.apple_watch_lukas', 'on') %}
            mdi:watch-vibrate
        {% else %}
            mdi:watch-vibrate-off
        {% endif %}
      state: >
        {{ 
            is_state('binary_sensor.lukas_wohnzimmer_presence', 'on') or 
            is_state('binary_sensor.lukas_bad_presence', 'on') or 
            is_state('binary_sensor.lukas_vorraum_presence', 'on') or 
            is_state('binary_sensor.lukas_zimmerx_presence', 'on') 
            }}
      device_class: "presence"
      attributes:
        rssi: >
          {% if (is_state('binary_sensor.lukas_wohnzimmer_presence', 'on')) %}
            {{ states('sensor.lukas_apple_watch_wohnzimmer_rssi')|float }}
          {% elif (is_state('binary_sensor.lukas_bad_presence', 'on')) %}
            {{ states('sensor.lukas_apple_watch_bad_rssi')|float }}
          {% elif (is_state('binary_sensor.lukas_vorraum_presence', 'on')) %}
            {{ states('sensor.lukas_apple_watch_vorraum_rssi')|float }}
          {% elif (is_state('binary_sensor.lukas_zimmerx_presence', 'on')) %}
            {{ states('sensor.lukas_apple_watch_zimmerx_rssi')|float }}
          {% elif (
              (states('sensor.lukas_apple_watch_wohnzimmer_rssi') != "unknown") and
              (states('sensor.lukas_apple_watch_zimmerx_rssi') != "unknown") and
              (states('sensor.lukas_apple_watch_vorraum_rssi') != "unknown") and
              (states('sensor.lukas_apple_watch_bad_rssi') != "unknown")
             ) %}
            {{ [ 
                states('sensor.lukas_apple_watch_wohnzimmer_rssi')|float,
                states('sensor.lukas_apple_watch_zimmerx_rssi')|float,
                states('sensor.lukas_apple_watch_vorraum_rssi')|float,
                states('sensor.lukas_apple_watch_bad_rssi')|float 
            ] | max }}
          {% else %}
            -100.0
          {% endif %}
        room: >
          {% if (is_state('binary_sensor.lukas_wohnzimmer_presence', 'on')) %}
            Wohnzimmer
          {% elif (is_state('binary_sensor.lukas_bad_presence', 'on')) %}
            Bad
          {% elif (is_state('binary_sensor.lukas_vorraum_presence', 'on')) %}
            Vorraum
          {% elif (is_state('binary_sensor.lukas_zimmerx_presence', 'on')) %}
            Zimmer X
          {% else %}
            Unbekannt
          {% endif %}

Now I want to give the attribute rssi some more information like:

          device_class: signal_strength
          unit_of_messurement: dBm

Is that possible?

Regards
Lukas