Wenar

esphome-sensor i switcg-template

Apr 13th, 2020
336
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. binary_sensor:
  2. - platform: gpio
  3. pin:
  4. number: D1
  5. mode: INPUT_PULLUP
  6. inverted: True
  7. name: "Status d1"
  8. device_class: light
  9. - platform: gpio
  10. pin:
  11. number: D7
  12. mode: INPUT_PULLUP
  13. inverted: true
  14. name: "test 1 WL"
  15. on_press:
  16. then:
  17. - switch.turn_on: test1
  18. - delay: 400ms
  19. - switch.turn_off: test1
  20. ###################
  21. switch:
  22. - platform: gpio
  23. pin: D5
  24. name: "test 1"
  25. id: test1
  26. - platform: template
  27. name: "test1 template"
  28. icon: "mdi:lamp"
  29. turn_on_action:
  30. - switch.turn_on: test1
  31. - delay: 400ms
  32. - switch.turn_off: test1
RAW Paste Data