History stats - Count multiple zones as one

Hello people,

I would like to track how long i am in specific zones. For my sport training I have three different zones, one for each practice field. But I want to count these 3 zones as one to track it with history stats.

Does anyone have an idea how to do this?

Create a template sensor. Track that with History Stats.

Could you give me a hint how to do this?
Do I need to do this with an trigger in the sensor?
im sure its pretty simple, but I dont get it. :frowning:

You need to check if your tracker is in any of the zones, so a binary sensor template like this:

state: "{{ states('tracker.your_tracker_here') in ['zone_name_1_here', 'zone_name_2_here', 'zone_name_3_here'] }}"

Thanks a lot!
My sensor have now the state of “false”, so he should go on true, if im in one of this 3 zones, right?