--- a/src/lib/simulator/src/electronics/components/ecvoltagesource.cpp
+++ b/src/lib/simulator/src/electronics/components/ecvoltagesource.cpp
@@ -55,6 +55,6 @@
     }
     Q_UNUSED(oldValue);
 
-    double voltage = newValue.asDouble();
+    double voltage = newValue.toDouble();
     m_voltageSource->setVoltage(voltage);
 }