Can I prevent automatic updates to block states?
If you do not need there to be a daylight cycle, use /gamerule doDaylightCycle false
when the sensor has the power you need, and it will stay that way as light won't change around it. Otherwise, you could put it in a closed environment, where you can control the light using torches and such.