[SOLVED] Error with averageSince function in text-based rules (persistence - influxDb, mapdb)

WARNING sendCommand is asynchronous, it goes off onto openHABs event bus and actions it may trigger - like autoupdate changing the Item’s state - will happen shortly, but not immediately.
The rule doesn’t stop and wait for that to happen. So the Item state a few lines later may be either the new state or the old state.

Maybe that is what you intend, but it is not obvious.

It would probably be helpful to know what you were going to do math on

logInfo("BathroomFans.rules", "About to do math on " + DownstairsAverageHumidity.state.toString)

Also state objects are not actually Number types, rules can be picky in odd ways - try

TriggerHumidity1=(DownstairsAverageHumidity.state as Number) + 11