Converting Device Tracker Status in Helper

Hi, i want to create a helper that converts the status of a tracker to either off or on.

I think i am very close, but i just cant get it to resolve correctly. Maybe something to do with my syntax. Any help gratefully received.

{% if ( (is_state('device_tracker.diskstation', 'Away')) ) %} 
      Off
      {% else %}
     On
      {% endif %}

Internally the state is “not_home”.
(guess you are talking about a template binary sensor since the “helper” word is not helping).

Thanks the not_home made the IF statement work.

{% if ( (is_state(‘device_tracker.diskstation’, ‘not_home’)) ) %}
Off
{% else %}
On
{% endif %}