Create filter to get warnings only if the occurrence is 'n' in a consecutive way

I’m trying to create a filter to get the warnings only if the occurrence is 5 in a consecutive way.

For below history, filter should not do anything. As ‘status 1’ is not 5 consecutively.

{
“history”: [
{
“status”: 1,
“executed”: 1644847740
},
{
“status”: 1,
“executed”: 1644847755
},
{
“status”: 1,
“executed”: 1644847770
},
{
“status”: 2,
“executed”: 1644847785
},
{
“status”: 1,
“executed”: 1644847800
}
]
}

Only below scenario should qualify the filter.

{
“history”: [
{
“status”: 1,
“executed”: 1644847740
},
{
“status”: 1,
“executed”: 1644847755
},
{
“status”: 1,
“executed”: 1644847770
},
{
“status”: 1,
“executed”: 1644847785
},
{
“status”: 1,
“executed”: 1644847800
}
]
}

Hey there, I’d recommend looking at the fatigue check filter to see if it meets your needs.