Attribute is "None" - how to check this in template?

Here is some entity:


Originally this was a Life360 device_tracker entity.

Currently Life360 services are not available for Russia (thanks to the war & it’s supporters in still my country).
Life360 mobile clients are not connected to the servers and not getting data.

I am trying to use an alternative GPS-based service and would like to check the fact “Life360 trackers do not work”.
Since there is no last_seen attribute (one of the absent attributes) - first I was going to use this template:

{{is_state_attr("device_tracker.life360_ildar_iphone_5s","last_seen","none")}}

It does not work.
And other similar templates do not work too:

Can anyone tell me how to check this case?

Taras, thanks for a reply.
Does not work too…


Eurica!

{{state_attr("device_tracker.life360_ildar_iphone_5s","last_seen") == none}}

I wonder if this is a proper behaviour?

1 Like

Seems that none is a kind of null in C/C++ (is not a string, is a keyword).
BTW, can we use null here, is it the same?

Yes, good explanation as always)))

This is a useful method, thank you!

@123 why have you deleted all your posts in the thread?