@pnbruckner wrote:
Has anyone else noticed that the
google_mapsdevice_trackerintegration sometimes gets updates out of order? I.e., it seems sometimes thelast_seenattribute for an update is older than thelast_seenattribute from the previous update. I’ve also looked at thelatitudeandlongitudeattributes when this happens and it seems sometimes an older update happens a second time (after some other updates with newerlast_seentimestamps.)I have a fix for this that I’m considering submitting as a PR, but I wanted to see if it was happening to anyone else before doing so. I came up with the following as a way to track this happening:
notify: - name: google platform: file filename: google.log timestamp: trueautomation: - trigger: platform: event event_type: state_changed condition: condition: template value_template: > {{ trigger.event.data.entity_id.startswith('device_tracker.google_maps') and trigger.event.data.new_state is not none and trigger.event.data.old_state is not none and trigger.event.data.new_state.attributes.last_seen is defined and trigger.event.data.old_state.attributes.last_seen is defined and trigger.event.data.new_state.attributes.last_seen < trigger.event.data.old_state.attributes.last_seen }} action: service: notify.google data_template: message: > old: {{ trigger.event.data.old_state.attributes.last_seen }} new: {{ trigger.event.data.new_state.attributes.last_seen }} {{ trigger.event.data.new_state.name }}This will write entries to a file named google.log in your config directory whenever this happens.
I’d be interested to hear if anyone else has noticed this, or if you give the logging technique a try and what your results are.
FWIW, sometimes this doesn’t happen for hours, maybe days, but generally it seems to happen several times a day.
Posts: 2
Participants: 2