12
133
1187
金牌会员
情非殇 发表于 2020-4-17 14:48 就是说,只要在前端显示1个switch,然后,turn_on输出g12,turn_off输出g14,这个完全没问题,可以写死在e ...
使用道具 举报
5
317
1345
netsnake 发表于 2020-4-17 17:33 定义一个显示逻辑开关( - platform: template ),定义两个隐式开关(- platform: gpio)。 逻辑开关分 ...
27
2120
9074
论坛元老
switch: - platform: template name: "test_01" turn_on_action: - output.turn_on: GPIO12 turn_off_action: - output.turn_on: GPIO14 output: - platform: gpio pin: GPIO12 id: GPIO12 - platform: gpio pin: GPIO14 id: GPIO14
情非殇 发表于 2020-4-17 18:31 还是没太看懂,12和14脉冲是不是有时间限制的,比如只打开1秒,或者只打开2秒复位 目前我理解的是这样
bynow 发表于 2020-4-17 18:37 是的,12 和14 要设置打开1秒就复位
switch: - platform: template name: "test_01" restore_state: false turn_on_action: - output.turn_on: GPIO12 - delay: 1s - output.turn_off: GPIO12 turn_off_action: - output.turn_on: GPIO14 - delay: 1s - output.turn_off: GPIO14 output: - platform: gpio pin: number: 12 mode: OUTPUT inverted: false id: GPIO12 - platform: gpio pin: number: 14 mode: OUTPUT inverted: false id: GPIO14
情非殇 发表于 2020-4-17 18:40 自己测试下,我不确定是否符合需求
本版积分规则 发表回复 回帖后跳转到最后一页
为论坛做出突出贡献的会员
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-5-7 01:16 , Processed in 0.503618 second(s), 25 queries .
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.