Add battery status to Tile tracker

Request to add the battery status for Tile trackers.

Currently no indication unless checking the Tile app.

Thanks!

I have achieved this via a template helper.

If the last location update “last_timestamp” is older than one week, then assume it’s battery has ran out. This is crude, but works.

It does not help with the issue of the location being reported as “active” even when it’s not been updated for months due to the battery running out.

I then use the Blueprint Low battery level detection & notification for all battery sensors to notify me of any low batteries.

{% if as_timestamp(now()) - as_timestamp(state_attr('device_tracker.bluetooth_speaker', 'last_timestamp')) > 604800 %}
  1
{% else %}
  0
{% endif %}