19
267
2464
论坛DIY达人
pyfm 发表于 2024-1-19 14:33 status_led: pin: $Red_led 和
使用道具 举报
1
11
86
注册会员
8
158
2198
金牌会员
jackyzrk 发表于 2024-5-9 23:24 我调整了一下,个人觉得检测缺料不需要10分钟一次,我调整为每次喂完饲料的时候去检测。 ...
0
70
786
高级会员
z00000000 发表于 2024-5-13 22:54 现在买的换了芯片了,刷机不成功。
polisher 发表于 2024-5-10 08:57 您的这种判断方式非常合理,还是劳烦放一下代码。
- platform: gpio pin: GPIO7 id: ina_switch internal: false on_turn_off: - switch.turn_on: infrared_led - delay: 100ms - if: condition: lambda: 'return (id(phototransistor).state) ;' then: - text_sensor.template.publish: id: missing_feed state: !lambda 'return "缺料";' else: - text_sensor.template.publish: id: missing_feed state: !lambda 'return "不缺料";' - switch.turn_off: infrared_led
17
130
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-6-21 20:43 , Processed in 0.340370 second(s), 23 queries .
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.