Template state() not possible/correct on if test?

HI,

using this for my xboxlive sensors:

    value_template: >
      {% if states.sensor.xbox_id %}
        {% if is_state('sensor.xbox_id', 'Offline') %} Offline
        {% elif is_state('sensor.xbox_id', 'unknown') %} Unknown
        {% else %} {{state_attr('sensor.xbox_id','XboxOne Full')}}
        {% endif %}
      {% else %} n/a
      {% endif %}

Works fine and the exist test seems to do its job as expected. If theres no sensor value yet, it shows n/a quite nicely.

Since I’ve been recently rewriting all of these states.etc expressions like state(), i tried that too in this template.

trying the same with

{% if states('sensor.xbox_id') %}

doesn’t work however and renders None…

is this to be expected?

I have this sensor and i don’t do anything special with it. rendering none should only happen on startup