Thankyou very much Kermit, I got the “full path of the global context” to work, but using that expression with $entitites resulted in a “Attempted to use a non-function” error.
However, I’m on my way again
For others who read this who might want to know what the calculation with the full path looks like: 1000-$number($globalContext("homeassistant.homeAssistant.states['input_number.heating_hysterisis'].state"))