Tile Bluetooth trackers: show last update timestamp on actual location updates from tile

Currently Tile devices show a last update timestamp probably from the last time a call was made to the Tile platform to receive the location. I have some devices with depleted batteries and within the Tile app I can see on which date the actual last location update (tracking) was done.

Not sure on which API this integration was build, but looking at this development; https://github.com/bachya/pytile more details can be retrieved.

If you’re handy with a text editor, you might be able to modify this file:

Add a new line on line 23:

ATTR_LAST_TIMESTAMP = "last_timestamp"

And another new line after line 141:

ATTR_LAST_TIMESTAMP: self._tile.last_timestamp,

I might submit a PR to add this myself. For now, this works.

Circling back here - I’ve submitted a PR to add this to Home Assistant.

2 Likes

Finding this thread a year and a half later, I’m trying to figure out how to get at the “last seen” timestamp for a Tile. I see that the PR was integrated, but the only info I see in HA for any of my Tiles is whether they’re home or not.

I don’t own a tile, so can’t test, but the code says, the sensor should have an attribute last_timestamp.

Take a look at Developer Tools > States and look for the sensor name. In the right column you should see the attributes. If not, mark the checkbox “attributes”.

1 Like

Sorry to reopen this after 2 years but did anyone have any examples for creating helper sensors, which uses the tiles last_timestamp attribute and a threshold (e.g. one week) to provide a crude “low battery” sensor?
Update:

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 %}