Question about conditions

I am wanting to turn on a light to 100% if the humidity in that room increases by 10%. Is there a way to do a %value% + 10% evaluation on the device?

AFAIK, there isn't a way to do this with RM. You would have to write a custom app for this unfortunately.

This should work. In my example, the comparison device is my Ecobee, but it could very well be a virtual thermostat if you need a fixed value for comparison.

Maybe get get you there... depends on how you want it to turn off..

Yeah the is my issue. The humidity in bathroom verses in the hallway are about 20pts off from each other.

I will have a look.

What's the light 100% for? Are you turning a fan on with a dimmer?

So after 11pm the house goes into sleep mode. I have all lights for navigating through the house at 10%. My wifey likes to shower at about 11:30 or later. The bathroom lights are at 10% and she would like them to be at 100% if showering. I have a Zooz 4-n-1 motion sensor but the issue I am running into is the baseline humidity could be 10-30pt difference than the night before. So it is a pain to get it working correctly. Hence if I could check when the humidity hits 10% above its previous reading then turn lights on 100% until humidity returns below initial humidity reading.

But that would mean that the lights would only go on AFTER she was in the shower and had gotten the room steamy. I would think she would want them brighter when getting ready to shower. Why don't you turn them up based on motion?
Also, turning them off when humidity returns to normal might be many minutes later.
The real issue is that you want to compare to a previous value which isn't possible in rule machine unless you use something like a virtual dimmer which I've heard of some people doing (setting the virtual dimmer to the humidity every so many minutes). That would allow you to store that variable. But that means you also have to have a significant enough time to detect the jump and also a big enough jump to make sure you're not just getting natural changes to the humidity. I think you would be well served to figure out a different means to coming up with a final solution.

What I do now works very well but with the humidity changing the baseline number I am using is flawed. Here is the rule:


See - if I could somehow capture initial state of the humidity then I could compare.

Can you run custom commands to setRelativeHumidity on a Virtual Omni Device, or maybe a different virtual weather device or something? I just tried with Omni on my end and was able to create the custom command successfully, but when I tried to create a rule to run the action, the device list is blank. If this worked, my thought was that you could have a couple rules to set virtual humidity like a variable, then reference the virtual device in your rule above.

How would you get the value of the current humidity device though?

Since the custom commands only take explicit values, you'd have to do it in ranges probably. Set up multiple rules to say that if your sensor is between 7.5-12.5, setRelativeHumidity to 10, if it's between 12.5 to 17.5, set to 15, if it's between 17.5 to 22.5, set to 20, etc. Pretty much a PITA, but it was an idea...based on a capability that I'm not sure even works :rofl:

Could you add a contact sensor to the door. Closed could capture the current status of the sensor? And then trigger from there? Just a thought. I've been thinking of doing this in our bathroom and was contemplating a way to do this as well. I'll definitely be following.

If I'm understanding correctly, this is the problem...no OOB way to do this.

I have no way of checking from work, but is there not an option to do this in RM? I could've sworn there was? Can someone please check?

@bravenel

Bruce - any suggestions for solving my logic dilemma?

I've been trying to think about ways to translate a humidity reading to a virtual dimmer to act like a variable. I have an idea, but I'm not at home so can't test to see if it will work.

Trigger of humidity <= 100, action to make a web request that sends a setLevel command with %value% to the Maker API endpoint of a virtual dimmer. This would store your baseline value. Disable this rule by whatever method you want after the shower comes on to prevent it from updating further.

Another nearly duplicate setup to set a second virtual dimmer to your actual humidity level. This would be a real-time reading, so no disable necessary.

Then a third rule to compare the two and perform actions when actual exceeds baseline + 10%.

Maybe??

It is not possible to do so; see this thread answered by Bruce:

Bruce: "But it is not possible in general to grab a value of one device and set another from it. Maybe in the future..."

I now have 3 WebCore pistons left over; one of them is to account for exactly this inability.

J

Ah.... If only WebCore worked with Hubitat in a reliable way... :frowning: