First version of heating/cooling rules.

Replaced all context rules with heating/cooling rules.