Node-red has modbus nodes. No reason to shell out to python which, imo, makes things more difficult and less portable. There are hundreds of examples around the forum and YouTube and the www of using node-red with modbus.
The Python script is supposed to simulate a CO2 sensor. I intended to create a program where I have a setpoint and a "measured" value. When the damper opens, the CO2 level and the slider should gradually decrease. However, as soon as I deploy my program, it seems unable to calculate, and the damper closes to 0%.
The type of damper I have operates on a scale of 0-100% within a range of 0-10000.
As I said, I do prefer an external Python script with MQTT for the unknown. I did try those Python nodes, I never felt I could make them work the way I wanted so I have permanently skipped that path
Maybe you find @Steve-Mcl suggestion being the best-fit solution, otherwise, since you seem doing well with Python, go the MQTT path and fix the script. How hard can it be...