Traccar integration: add "battery charging" attribute

Currently the Traccar seems to acquire a “battery charging” bool flag from a mobile device.
It is displayed both in Traccar Web manager & iOS Traccar Manager:

282198431-3c170f4e-22fd-428d-9eaa-e5a0021e7e7c

But the HA Traccar integration does not have this attribute:

Please add the “battery charging” attribute to the HA Traccar integration.

The “charge” attribute is provided by Traccar & can be added to HA.

image

You can add the charge attribute to Home Assistant, if you follow this:

Think you would have to make a new template for your car or what you use.

1 Like

Lars, you are great!
Will test this workaround some more time…


Update:
The “charge” attribute seems to be present only:
– if a device is charging (which is obvious);
– if a device has some particular OS & model - then Traccar client reports this info to a server.

The last point is rather interesting.
For instance, when iPad Air 2 (iOS 15.x) or iPhone 12 (iOS 17.x) are charging - then Traccar server shows “charge = true”. If not charging - the “charge” attribute is not present - so it may be considered as “not charging”.
But for some other devices like iPhone 5S (iOS 12.x), some Android phones - the Traccar server never shows the “charge” attribute even when these devices are charging.
BTW, Life360 on same devices used to get the “charge” attribute properly - i.e. this could not be a “these devices do not report this attribute on OS level to the Traccar client” explanation.