I can use a Current State Node in Node Red to get the value of an entity. I would like to instead get the value of the entity plus 1. Is that possible?
I tried to set the msg.count output property to jsonata “payload + 1”, but it does not like that, because payload has not actually been set yet. Is there a way to refer the the state value of the chosen entity in Jsonata so I can add 1 and return that to the next node?
Just in case it is useful for anyone else searching for this in the future, it is also possible to put multiple outputs in a single “Current state node”, and they can all be read in the following nodes. You just include the name of the sensor(s) that you want to put in the output, or example:
$number($entities("sensor.my_counter").state)
You can even add multiple sensors together in an output: