[SOLVED] Influx Persistence

I’ve just found a need for it…

I have an location that refreshes every 5 minutes, I have 2 rules,

one which uses the previousState(true) part to see if the current location <> the last changed state of the location and then does something

a second one that I only want to do something if the current location <> the last refreshed previous location.

An example, I have a rule that runs a geolocation, if I’m within 500m of my home, it sets an item to HOME, 500m > 5000m = LOCAL, and 5000m + = AWAY

Now, i drive home and my journey takes 30 minutes, previousState(true) will tell me that I’ve gone from AWAY to LOCAL to HOME, depending on where I am on my route home.

When I get home and stay there, current location is HOME but the previousState(true), will always show LOCAL as that was the last different state from home.

However, I want to rule to run only if the last refreshed state wasn’t HOME, ie I’ve only just arrived in that area so I want things to happen first time, and once. So, for example my outside light turns on to guide me down the drive. What I don’t want is my outside light turning on every 5 minutes on every item refresh as it would do with previousState(true)…

EDIT

I suppose I could control this in the rule and alternate by on item changed / posted update…I might just haveto accept this isn’t all things to all men as @rossko57 mentioned above…