Trendline for switches > conversion to int necessary?

I want to show a trendline of a switch. One switch shows false/true, the other ON/OFF.
Do I have to make a second item to convert to 0/1 by JS or a rule to show a trendline when the switch has changes its state or is there a simpler solution?