The issue I am trying to solve is that i want to be able to display a number of state changes of a particurlar item, say I have a door contact sensor and the information about the status change is stored in mysql.
So I can get the current and n-1 value and update time using
or the item at a particurlar time using the
But is there a way to extract, for example, the last 10 records from mysql peristence?
I have come across the same question being raised back in 2017 here
That suggested using the extra variables for keeping the changed state of an item, but it seems like a rather useful option to have, so maybe it i already implemented and I am simply mising something obvious here.
Thanks in advance.