Monitor duration of state changes on windowing boundary

Hi @PetrusTheron and welcome to the InfluxDB forum.

Your situation sounds similar to this one. Did you read through this already and/or try it?