Automation - ping as service in action section?

Hi

Is it possible to force a extra ping for devices in device_tracker via the action section in automation ?

Case :
All the phones in the family are already tracked via ping in device_tracker every few minutes. But when the outside camera picks up a person around the house I would like to force a extra ping for every phone straight away - and if no phones responds then throw an alarm message to house owner.

Thank you for any help.

Starting with 0.81 there is a new homeassistant.update_entity service available. It takes one parameter – entity_id – which, like most services that accept this parameter, can be a single entity_id, a list of entity_id’s, or a string containing multiple entity_id’s separated by commas.

But, unfortunately, device_trackers don’t work like other entities. I.e., they don’t have an update method that can be forced to execute via this new service. So as far as I know, no, there isn’t a way to force a ping device_tracker to update on command. The best I believe you can do is to shorten the ping interval via the interval_seconds config parameter.

Any news for this? Can you force it now?

Well, several of the device tracker platforms have been converted to the new “entity based” device tracker architecture, so I guess for those the homeassistant.update_entity might would work??? I don’t really know. But, even so, I think the ping device tracker platform is still a “legacy” tracker, so it still wouldn’t work for it.

I don’t know since when, but I can confirm that homeassistant.update_entity works for force-updating the ping tracker now!