gpt4 book ai didi

nest-api - 嵌套 API : when is Thermostat 'heating' or 'cooling' ?

转载 作者:行者123 更新时间:2023-12-04 12:20:41 25 4
gpt4 key购买 nike

如果 Nest Thermostat 设备处于“冷却”或“加热”状态,它会显示在屏幕上。如何通过 Nest API 获取此状态?
hvac_mode属性似乎只是显示用户的 Thermostat 能够控制的内容,并且在发生冷却或加热时不会改变。

现在,我使用的是一个简单但并非完美的逻辑:

if (can_cool && target_temperature < ambient_temperature) --> isCooling
if (can_heat && target_temperature > ambient_temperature) --> isHeating
else --> isDoingNothing

并非完美无缺,我的意思是我遇到过这种逻辑不正确的情况。例如,在给定的情况下, ambient_temperature20 Celsiustarget_temperature21 Celsiuscan_heat设置为 true ,我的用户界面会说恒温器正在加热,而实际上不是。

这可能是因为目标温度和环境温度太接近了,但我不知道阈值是多少。

是否有另一种或更好的方法来确定加热和冷却状态?

最佳答案

截至 2015 年 5 月,Nest API 现在正式报告 hvac_state 属性(property)。该值将是“加热”、“冷却”或“关闭”之一。

New fields in the data model: hvac_state. You'll use hvac_state to learn if the home HVAC system is actively heating, cooling or is off.

关于nest-api - 嵌套 API : when is Thermostat 'heating' or 'cooling' ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26415239/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com