A very simple approach, is shown in the following schematic.
The 2 resistors of 1 kOhm each, make a voltage divider /2, providing a Vcc/2 voltage to the (+) pin of the comparator. This is used to set the (+) input at higher voltage vs the (-) input -and so- force the output (Y) to high state...