I tried to use the OR operator || to improve this code, but it didn't work the way I though. Is there anyway to simplify this code. The number are all integers.
If you create an array of your HeatPumpTemp_MB(s) of interest, you can simply check to see if your current HeatPumpTemp_MB is in your array, if so add one, if not add two:
let interestingMB = [19,21,23,25];
I think you can figure it out from here
PS: This has very little to do with Node-RED as is just a basic programming 101 question, regardless of the language you are programming in.