Johanvh
(Johan Van Hoorde)
November 4, 2025, 2:27pm
1
Have a slider in my HA dashboard. When I change the slider the value appears in Node-Red as output of a events node state:
I’d like to use this value (payload) in a current state node.
Here 55 is used as a fixe value but I’d like to use the sliders value
Thanks for your help!
Mikefila
(Mike Fila)
November 4, 2025, 3:08pm
2
You can use jsonata to return the value.
$number($entities('input_number.my_number').state)
$number() casts the value to a number. $entities() brings the value of the entity.
Johanvh
(Johan Van Hoorde)
November 4, 2025, 3:47pm
3
Thanks!
Have entered the json data.
I suspect it will work but will let you know after a test.
Many thanks!
Mikefila
(Mike Fila)
November 4, 2025, 4:15pm
4
JSON is not the same as jsonata/J expression. JSON is not an option for that particular field. It is an option in the data section where jsonata can also be used.
https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/jsonata/#examples-of-using-jsonata-in-the-home-assistant-nodes