Change Sensor value

Moderators: grovkillen, Stuntteam, TD-er, enesbcs

Post Reply
Message
Author
Lonzo
New user
Posts: 7
Joined: 10 Jun 2020, 20:52

Change Sensor value

#1 Post by Lonzo » 10 Apr 2021, 17:37

Hi, I have a small problem: I am measuring waterpressure, value goes in ADS0#Wasserdruck. Works fine - but: if no water is flowing the values swings around 0 (-0.1, 0,04 and so on).
Is ist possible to create a rule like: if ADS0#Wasserdruck<0.2 then sensor value is 0.00?
Under ESPeasy it is easy to use an internal variable, but in RPIEasy I don´t know how to do.
Maybe someone can help me.

Thank you

Lonzo

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Change Sensor value

#2 Post by enesbcs » 11 Apr 2021, 18:20

Lonzo wrote: 10 Apr 2021, 17:37 Hi, I have a small problem: I am measuring waterpressure, value goes in ADS0#Wasserdruck. Works fine - but: if no water is flowing the values swings around 0 (-0.1, 0,04 and so on).
There are a lot of possibilities. I guess you are using an Analog ADS1115 device. You can either set decimals to zero, or use a simple formula at the plugin page to smoothen values. For example:

max(int((%value% * 10) / 10),0)

Lonzo
New user
Posts: 7
Joined: 10 Jun 2020, 20:52

Re: Change Sensor value

#3 Post by Lonzo » 12 Apr 2021, 12:08

Tank you! I will test it.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest