Math result OFF by 1

I’m sure I’m missing something here.

Summary: I think the math function is off by 1. Not sure why.

I created 2 variables:
$EcobeeTemperature

      $WoodBurnerSetPoint

They both update when either the Ecobee temperature changes or the Wood Burner Set Point changes. (The Wood Burner Set Point is a Virtual Thermostat)

I can watch the variable change when either changes, so that seems okay.

I have another variable that does the math and SHOULD report the difference between $EcobeeTemperature and $WoodBurnerSetPoint.
It Does both are 73…

Here is the rule:

However, the rule itself is showing the difference to be off by 1

The variable is off by 1

Is this a SharpTools Math issue or am I missing something on my end?

Where are the $EcobeeTemperature and $WoodBurnerSetpoint being set?

Are you sure they were both 73 when the rule ran and evaluated the expression?

If you have separate rules that are setting those variables based on events, you may be running into a race condition. For example, if each of those variables are set when their related device attribute changes… and you’re also using those attributes changing as the trigger for this rule, then you won’t consistently know if one, both, or neither of the variable values has been updated yet via the other rule.


Wood Burner Setpoint is set manually using a virtual thermostat.

Either one of the triggers sets this variable almost instantly.
Ecobee being the device and Wood burner being a virtual thermostat.

Yes, they were both 73.

Seems I’ll need to figure out a different way to accomplish my goal… :thinking:

What I’m trying to do is change two “NUMBERS” that are in this rule:

This rule changes a variable to “TRUE” When “MyEcobee” is 73 or lower. It also changes a variable to “FALSE” when “MyEcobee” is 74 or higher. (1 Device changing the variables, so I see what you mean about the race).

What I want to do is be able to “MANUALLY” change the numbers in the rule from 73 to 72 and 74 to 75. That would make the fan come on 1 degree sooner and go off 1 degree later.

I figured a virtual thermostat would give me the flexibility to change a number because I can’t figure any other way to do it. :thinking: