So some issues have been identified with the new require_movement
feature.
The first is, if one or more of the “input” trackers gets created (during startup) after the composite tracker then the (unfortunately) usual WARNING about source_type
being None
can turn into an ERROR, resulting in the input tracker being ignored.
Next, although the feature was intended to deal with multiple devices, where one or more might be “left behind”, it also affects the device(s) that are being moved around. And it also affects when one is using multiple services on the same device (assuming the feature is enabled.)
The second scenario is this… If the device movement slows down enough (saying walking slowly after driving), the difference between updates might not be big enough, so the composite tracker will get “stuck” where the last “big enough” movement ended. And if this happens right outside a zone, although the device is eventually moved into the zone, the composite will never reflect that.
Lastly, the battery attributes (charging & level) might not be very appropriate for a composite tracker. E.g., with multiple devices, which device’s battery it’s displaying depends on which is moving. And if multiple ones are moving then it will be constantly switching back and forth. Even for a single device, with multiple services (e.g., Life360 & Google Maps, like I use), it will switch between what each service reports, which can be different. (E.g., Life360 & Google Maps report battery charging differently.)
So, I’m thinking of dropping the battery attributes from the composite. One can always make a template sensor if they know their situation and how to properly combine multiple battery attributes in a way that makes sense.
Regarding the first issue (warnings & errors), I’ve made a fix which seems to work. It’s available here if anyone would like to try it out before I release it. If you do please let me know how it works for you.
Regarding the second issue (getting stuck with low movement), I need to do something that handles this situation better, such as taking an average of all updates that didn’t have enough movement so that “drift” (e.g., slow walking) is taken into account. If anyone has any good ideas about the best way to handle this, by all means…
Regarding the third issue (battery attributes), unless there’s an uproar of complaints, I’ll probably delete them. This is your chance!