Hi. I am new to SharpTools and trying to re-create an automation I created in Groovy where I compared the humidity in my attic from my Zooz ZSE40 4-in-1 Sensor to the humidity for my local weather. My attic has had mold in the past. I’ve read up on the whole theory of attic fans and have figured out that I want my attic fan to turn on when the humidity in my attic is greater than the humidity outside. That is, I don’t want to be pulling in more humid air into my attic. I only want to pull in less humid air. This was working great until Groovy was retired. I’ve successfully created a rule in SharpTools that will retrieve the local humidity using OpenWeather. I am also able to see the sensor when I create an If Condition / Device. I am able to see all attributes including humidity so I am sure I will be able to use this in an If condition against the OpenWeather humidity. What I would like to do for now is pull in all of the sensor data and send the values in an email like I have done with OpenWeather. I’d like to do this for debugging purposes but also to possibly create other rules based on the sensor values. Any help would be appreciated!!
Can you share what you’ve tried so far?
One approach would be to have a rule trigger whenever the humidity
value on the Zooz Sensor changes and then use a Context Variable (event value) to forward the triggering event value on via email.
I’m using some other tricks in the notification like using an inline expression to determine if we say “is” or “is not” (using a ‘ternary conditional’)
comparison ? trueOutput : falseOutput
Hi Josh. Thanks for the comments. I was able to use the context variables as you described and am able to send via email and SMS the humidity and temperature values for both the attic sensor and OpenWeather. I’ve been able to create all of the rules and actions needed to turn the attic fan on and off. I’m just waiting for the humidity outside to be lower than the attic where the fan should turn on using my Sharp Tools rule. Great stuff! Thanks again!