Notification based on state history

I am trying to build an automation that sends a message to the person that was registered close to the washing machine by ESPresence.

I thought using a history_stats sensor could help in determining who was near the washing machine in the hour before it started running.

I have tried ‘type: count’ as well, but get odd values like 0.1 when i use count.

  - platform: history_stats
    name: Rik was close to the washing machine in last hour
    entity_id: sensor.espresence_rik_s_iphone
    state: "zolder"
    type: time
    end: "{{ now() }}"
    duration:
      hours: 1

This sensor should give the time in minutes that sensor.espresence_rik_s_iphone was close to the washing machine right? If so, I could also use this as a state condition.

Maybe someone else has a take on this with a different approach?