Enforce node to send zero value

Hey there,

I use ds18b20 node in node-red to read sensor values directly, I want to write python code to enforce this node to send zero value instead of its real value. could you help me, please?

I assume this is on a Rpi ? Do you mean you want to ignore whatever value is coming in and then just send out a Zero instead - presumably sending it out on a MQTT topic ?

Not need to get python involved

Just use the change node

Craig

yes it is raspberry pi

I think python code is better, as I want this sensor send zero instead of its real value when I run python script, and when stop it then it return back to its normal situation ..

I don't like to change it through node-red by itself, I need to write python script and change it , so the node-red read the new value
can I change the value "t" in w1_Slave? writing python code to set it zero each time, so node-red node reads this new values from w1_Slave, or may this is not applicable and it doesn't work.

What is w1_slave? Is that a variable in some code somewhere or what?

This is not entirely a Node-RED question is it. You can do this purely in Node-RED and even have a switch that lets you turn on/off the zero flow if you wish.

ok. thanks. it is really not pure node-red question. I am sorry for that I will delete it