Wondering if you have seen this:
I’m not too clear on why anyone would not want to halve the voltage calibration from a 240V VT in a split-phase installation. I use a 240V transformer with halved calibration. To be able to easily see the 240V value I simply have an output the multiplies it by 2.
The post referenced above explains how it is exactly accurate for 240V loads, and also increases accuracy of 120V circuits by limiting the effect of imbalance to the imbalanced load.
What you are suggesting would not be generally useful to anyone else, and providing that checkbox might only further confuse users that are already challenged by the nuances of measuring various split phase 240V circuits. It would probably lead to more support questions, and I would be hard-pressed to explain its utility or justify its existence in light of how I have previously recommended using a 240V VT for split-phase.
All that said, if you really want to do this, modification of the IoTaWatt firmware would not be needed. The legacy “double” checkbox simply adds a json object
“double” : true
to the input in config.txt. Since then, a more useful method was added in the form of an input object “vmult” that is a multiplier factor for the reference voltage. Functionally, the double object could be eliminated and vmult set to 2.0. For your scheme, you need only set vmult to 0.5.
So, you could do this by simply altering you index.html to add your “half” checkbox and subsequently setting
“vmult” : 0.5
if setected.