If then else sjablone > is_state_attr

hi ,

i want a sjablone that checks if the value is “None”

my code never the outcome ,i always got the “else” block as return ,
what can be done , so that this sjablone works fine ?

{% if is_state_attr('media_player.kantoor_3', 'media_artist', "None" ) %}
its none   

{% else %}
its something 
{% endif %}

thx

you are mixing quotation marks.

try this:

{% if is_state_attr('media_player.kantoor_3', 'media_artist', 'None' ) %}
  its none
{% else %}
  its something 
{% endif %}

the solution was :

{% if state_attr('media_player.kantoor_3', 'media_artist') == None %}
its none   

{% else %}
its something 
{% endif %}