【发布时间】:2014-11-27 07:29:06
【问题描述】:
有什么方法可以查看系统当前是否处于加热/冷却/待机状态? 换句话说:恒温器的显示颜色是什么? (红/蓝/黑)?
我在记录的 API 中看不到它的值。我可以从多种因素中得出它吗?
例如,如果 hvac-mode=heat 和 target-temp >ambient 那么它一定是在加热......
【问题讨论】:
标签: nest-api
有什么方法可以查看系统当前是否处于加热/冷却/待机状态? 换句话说:恒温器的显示颜色是什么? (红/蓝/黑)?
我在记录的 API 中看不到它的值。我可以从多种因素中得出它吗?
例如,如果 hvac-mode=heat 和 target-temp >ambient 那么它一定是在加热......
【问题讨论】:
标签: nest-api
【讨论】:
您需要跟踪 Heat On/off 的状态才能正确计算。我以 1 hz 监控 NEST 并将最后一个状态(开或关)存储为变量。获得此信息后,您可以使用以下逻辑并且它是准确的:
lastStatus.Contains("Off"))
{
if (temp_current < temp_setpoint)
status = "Heat On";
else
status = "Heat Off";
}
else if (lastStatus.Contains("On"))
{
if (temp_current > temp_setpoint)
status = "Heat Off";
else
status = "Heat On";
}
// Do the work....
lastStatus=status;
注意:temp_current 和 temp_setpoint 从 REST http 帖子返回。祝你好运!
【讨论】: