Keep a default polling - but add conditions

There are no integrations that do this. They all implement a frequency.

I have no idea what you’re talking about here. Entities are separate. The update is called on the individual entity. If the entity has a coordinator in the background (to provide updates to a collection of entities and reduce API calls), they will all update in unison and 1 update for the integration is made.

last_updated is a property on a state object, it simply just shows the last time the state object changed. It is 100% unrelated to polling. The only relation is that polling can potentially update this property if the previous state object is not the same as the new state object. This is no different than a non-polling entity. All entities behave this way with the last_updated field. Do not get confused by the name last_updated. Read the state object documentation.

Yes, I read the Docs and know what is written about “last_changed”.
Then how can you explain why:

  1. Manual calling “update_entity” for “device_tracker” causes a renewal of last_changed - although content is same.
  2. If polling is ON, then this entity has a new “last_updated” only if it’s content is really changed?

Here is some offline device with same content but different last_updated:

I can’t explain that. It should not change. traccar client is local push (not polling), you shouldn’t even need to call an update on that.

Yes, that’s how HA works, HA handles this, not the integration.

Good, as expected.

I was not going to switch OFF polling in Traccar first.
But I am having issues with network now. And when network is down - the log is filled with errors related to Traccar.
So, my idea was to:
– switch OFF polling for Traccar;
– call “update_entity” in an automation periodically - with a check “if network issues → do not update”.
But then I faced this “same objects - renewed last_updated” problem.

Here - switched ON polling again, and last_updated is not renewed, same 15:27 (as expected):


i.e. the entity is not marked as “updated”.

Traccar is not polling. It’s not a polling integration. Unless you’re running something custom, all Traccar integrations are local push. I.e. There’s no polling option to disable. The option in system options is misleading, you’re turning off push updates on the entity. This integration has no defined polling frequency. Traccar sends live updates to HA and HA reacts. I.e. if your car position changes in traccar, traccar sends that to HA and HA responds. Just like a light turning on and off from zigbee or zwave.

1 Like

Thanks a LOT for explanation.
For me it means - not all integrations can be “switched to a manual mode” & replaced by an automation.