Count number of cleans longer than 15 minutes during last week

I use Roomba component ( for my vacuum.
Currently, a number of cleans during last week is displayed in the UI using the following sensor:

- platform: history_stats
  name: Vacuum cleans last week
  entity_id: vacuum.roomba
  state: 'on'
  type: count
  end: '{{ now() }}'
    days: 7

But sometimes runs are pretty short and I want to see how many cleans longer than 15 were actually done in last 7 days.
Does anybody have an idea what can be used for it? Currently the only one way I see is writing a custom SQL query and fetch the count directly from the DB.