Hey,
you learn best by browsing the community :D
One of my first flows do this(with a little overhead of dynamic locations, but i think you could understand it anyway)
I quickly change to improve it to support different actions:
And finaly came to a more modular way: (Advanced users only)
Where you need to create additional subflows to perform any task.
Like my Volume manager to mute your phone at a location:
However, if you realy want to run the flow every 15 minutes and not based on the when change event of the location at block. For whatever reason, you need to save the last state and compare it with the current.
The best way would be an array with a size of 3 and initialized with 0.
location 1:
if array[0] = 0 and location 1 = in range -> perform enter event and set array[0] = 1
else if array [0] = 1 and location 1 = not in range -> perform leave event and set array[0] = 0
location 2:
if array[1] = 0 and location 2 = in range -> perform enter event and set array[1] = 1
else if array [1] = 1 and location 2 = not in range -> perform leave event and set array[1] = 0
location 3:
if array[2] = 0 and location 3 = in range -> perform enter event and set array[2] = 1
else if array [2] = 1 and location 3 = not in range -> perform leave event and set array[2] = 0
Delay 15 minutes and start with location 1
//But be aware, that when you leave and enter an other location within the 15 minutes delay, it will perform a leave and an enter event, but you can't be sure if it first perform the leave or the enter event. So it is buggy and you may need to improve the expressions