a library for several FlowSensor can be found here :
https://github.com/hafidhh/FlowSensor-Arduino/
in this library we have configuration for :
// Sensor Type
// -----------------------
// YF
#define YFS201 450
#define YFB1 660
#define YFS401 5880
#define YFB1S 1077
// OF
#define OF10ZAT 400
#define OF10ZZT 400
#define OF05ZAT 2174
#define OF05ZZT 2174
//------------------------
you have to find configuration for YFS302 ...
i wrote a wrapper for this library, can you check if it can help you ?