Hello!
I have created a binary sensor using the ping integration.
Now I would like to use the time of the last change in a template.
However, if I want to output {{ states.binary_sensor.192_168_213_156.last_changed }}, I always get the error “‘None’ has no attribute ‘last_changed’”, because {{ states.binary_sensor.192_168_213_156 }} always returns “None”.
{{ states(“binary_sensor.192_168_213_156”) }} correctly shows the current status “on”.
Why is this the case? Is there no way to get the information?
Thanks in advance,
Chris