I need to get sample data for a period of at least 2 minutes after a state (on/off) has changed and remained stable.
I need to get the latest stable 2 minute+ period and and an average of all the 2 minute+ in a specified period.
My starting point is trying to identify all the points and which the state measure changed. How would I go about this with a Timestream query ?