output:                                //定义输出组件
                                       //下面定义模拟按下按键的输出IO    
  - platform: gpio
    pin: 05                            //使用的IO
    id: key1                           //定义下面button调用的id
    inverted: True
  - platform: gpio
    pin: 04  
    id: key2    
    inverted: True
button:                               //定义模拟按下的按键
  - platform: output
    name: "1 雾化开关"
    internal: false                  //定义是否仅内部使用,修改为true将不在ha界面中显示。
    output: key2                     //使用的输出id
    duration: 100ms                  //模拟按多久。         
  - platform: output
    name: "2 雾化连续选择"
    internal: false                 //定义是否仅内部使用,修改为true将不在ha界面中显示。
    output: key1                    //使用的输出id
    duration: 100ms                 //模拟按多久。

标签: none

添加新评论