Ok so, theres a few ways you could do this. This is how i would do it. First, set up Time. You can use HA as your time source.
https://esphome.io/components/time/homeassistant.html?highlight=time
Then just look at the examples they give you for how to use Time.

time:
- platform: homeassistant
id: time_source
on_time:
# Every 15 Seconds
- seconds: /15
minutes:
then:
- switch.turn_on: Fan
- delay: 5s
- component.update: Particulate Matter 2.5µm Concentration
- switch.turn_off: Fan