Colorfulclouds-weather icon indicating copy to clipboard operation
Colorfulclouds-weather copied to clipboard

如何更改查询频率?

Open kingtao1024 opened this issue 2 years ago • 4 comments

请问默认的查询频率是每小时多少次?最近我的彩云API开始统计后台请求次数了,收费是8元每万次,昨天看到请求了500+次,这个频率能否手动设置,如果不方便增加配置选项,能否告知一下代码位置?谢谢!

kingtao1024 avatar May 29 '22 05:05 kingtao1024

铜球铜球,大佬估计比较忙。我欲提交PR,奈何不会代码,求才子佳人相助~

yuyuye84 avatar May 30 '22 05:05 yuyuye84

找到了, 位置:.homeassistant/custom_components/colorfulclouds/init.py 第135行: update_interval = ( datetime.timedelta(minutes=2) )

kingtao1024 avatar May 31 '22 00:05 kingtao1024

想问问大佬,改成每小时调用一次,这个minutes这里2改成60吗

timelast avatar Jun 11 '22 13:06 timelast

是的,就是多少分钟查询一次的意思

kingtao1024 avatar Jun 11 '22 17:06 kingtao1024

卡片有pm2.5的数值显示,但没有实体传感器,想调用pm2.5的值加个自动化,有知道的朋友吗?谢谢

WinterBoring avatar Nov 06 '22 12:11 WinterBoring