Is this AN on comparator with hysteresis wrong?
simulate this circuit &ndash; Schematic created using CircuitLab

Basic Thevenin stuff. VREF is what you want. VREF = I3*R2. Plug in the equations to make I3, and solve. Put in VOUT = 0 for one threshold and VOUT = V+ to find the other.