onChange function not called on change

One example:

Here I calculate the absolut voltage difference (CloudElectricPotential voltageDifference) between the two batteries:

      //Berechne die absolute Differenz der beiden Batteriespannungen
      voltageDifference = fabs(battery01Voltage - battery02Voltage);

Whenever this is calculated I exptected that function onVoltageDifferenceChange(); would be called as there, I do a couple of things like:

  • Deciding if I need to change the state of bool batteryDiffernenceAlert, basically deciding if I have to trigger an alert.
  • Deciding if I have an anusual condition like voltage being to high or to low and deciding if I have to active Mosfet's who will balance the batteries, if triggered.

This works all fine, but not because onVoltageDifferenceChange() is called because 'CloudElectricPotential voltageDifference' has changed, it only works, because I call onVoltageDifferenceChange() regularly from loop().

Does this make sense to you?