Creating sensor to evaluate string within attribute

Hi,

I have a binary sensor with attributes that I would like to read and evaluate. Ultimately I would like to OR a few together, however, first things first I would like to just create one sensor that is True or False based on one of the binary sensor state attributes.

Here is my binary sensor.

Here is my line within sensor: section of configuration.yaml.

     kara_in_use:
       value_template:  '{{ states.binary_sensor.kara_active.Locked.state | "true" }}'

Take a look here:

Thanks heaps, got to this and seems to be good.

     kara_in_use:
       friendly_name: 'Kara In Use'
       value_template: >-
         {{(is_state_attr("binary_sensor.kara_active", "Locked", false)
           or is_state_attr("binary_sensor.kara_active", "Fast User Switched", true))
           and is_state_attr("binary_sensor.kara_active", "Sleeping", false) }}