#Template sensor using time from attribute of another sensor
1 messages · Page 1 of 1 (latest)
{{as_timestamp(now()) - as_timestamp(strptime(state_attr('device_tracker.desktop_betrtn6', 'last_time_reachable'), "?????"))}}
here's a little work in progress formula
Maybe try:
{{ (now() - state_attr('device_tracker.desktop_betrtn6', 'last_time_reachable')|as_datetime).seconds > 300 }}
will try