vith
(vith)
1
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
finity
2
you are mixing quotation marks.
try this:
{% if is_state_attr('media_player.kantoor_3', 'media_artist', 'None' ) %}
its none
{% else %}
its something
{% endif %}
vith
(vith)
3
the solution was :
{% if state_attr('media_player.kantoor_3', 'media_artist') == None %}
its none
{% else %}
its something
{% endif %}