# control::Tstat

    sys::Obj
      sys::Virtual
        sys::Component
          control::Tstat

`public class Tstat` `[niagaraIcon="module://icons/x16/control/util/switch.png"]`

Tstat Provides On/Off or Floating Thermostat control

      raise & lower outputs operate independently of isHeating mode.
        lower will be set to true if cv > (sp + diff/2) and will
              remain set until cv < (sp - diff/2).
        raise will be set to true if cv < (sp - diff/2) and will
              remain set until CV > (sp + diff/2).

      out will be set based on isHeating mode.
        if isHeating
           out = raise
        else
           out = lower

cv

  `public property float cv`

  actual

diff

  `public property float diff [summary, config]`

  deadband centered around sp

isHeating

  `public property bool isHeating [summary, config]`

  set true to put into heating mode, false for cooling mode

lower

  `public property bool lower [readonly]`

  need to lower

out

  `public property bool out [readonly]`

  calls for cooling or heating as required by sp/cv/isheating

raise

  `public property bool raise [readonly]`

  need to raise

sp

  `public property float sp [summary, config]`

  the setpoint

execute

  `public virtual override void execute()`

  Execute is called once every scan.