Cant get Simple automation rule to work with humidity

I have a simple rule to start the fan in the bathroom when humidity is over X% an stop when it is under 69%.
From what i can see the rule looks good, but it dosen't run.
I do get an error in the logs (See pic), but i cant figuar out if it is and error in the rule og in the app

I can get it to work in rule machine, but i do like to keep it simple :slight_smile:

simple automation is very buggy. never worked for a long time

I beg to differ. I have 7 SAR, and they have worked perfectly for us for a year. They turn our outside lights on and off at Sunset and Sunrise, they turn on/off our closet lights when the closet doors open/close, and they operate our patio fireplace lights via a virtual switch that is controlled by Alexa. Your use case may be different, but it’s never failed for me.

I just tried this myself. I made up a simple automation with the trigger being humidity:

No problem. No errors in log. It just worked by turning on the fan.
You must have some sort of other error.

Could it be an integer vs decimal/number casting issue?

Like if you specified 50.0 as the threshold would it error? And vice versa?

Which ever way you have it, try the other and see. If it clears the error make sure and report that back to Bruce.

EDIT: Nevermind, I just tested it. It errors if the humidity reading from the device is not an integer, but works fine if it is an integer. Seems like a bug. (?) @bravenel

Do your humidity sensor reports with decimals?
Like 50% or 50.10% ?

It seems to be a bug with decimal humidity eradings. Will have to wait for Bruce to fix it.

Works OK in Rule Machine, though. So you can do the rule in there for now if you need it.

1 Like

Semms like it. Thank you for testing it

I might be able to have the sensor to report without decimals, will try it an see if it works

If you wanted to do it in RM it would be something like this:

1 Like

@bravenel Also, FYI, it errors if humidity is a decimal/number format in Basic Rules, too.

So in summary, if humidity has decimal:

The bug is the driver. Humidity is defined to be integer. Seriously, think about 43.7% relative humidity, vs. 43.5% ????

The virtual humidity driver allows decimals. :slight_smile:

It should not. Actually, the driver doesn't enforce integer. None of the apps should work right if decimal used for humidity. It has to be integer.

So do at least 3 user drivers that support humidity I've found so far.

I don't disagree that it is useless to have that resolution. But it seems that multiple drivers report it as decimal already...

They are all wrong. If these are built-in, tell me which ones so they can be fixed. If they are user, let the author know...

1 Like

OK, no worries. I'm just reporting the findings. I'm ok either way - I can change the user drivers I found (I didn't write any of them).

Might be worth doing a search on the in-box drivers, too. Only one I know of that uses decimal is the virtual humidity driver though. I verified that the NYCE driver is correct. (the only other humidity sensor I have).

1 Like

I just fixed the virtual drivers. We've been chasing this one for quite some time. No device or driver should report a non-integer value, as it will error in the apps.

That can't possibly be true, otherwise you couldn't have thermostats in Celsius? And many in-box driver report temperatures with decimals.

Or do you mean just for humidity readings? If so, I agree/that makes perfect sense/:+1:.

I meant for humidity.

The only devices that support decimal are temperature related, and power/energy.

Download the Hubitat app