Advertisement
freddykat

Untitled

Jun 7th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. esphomeyaml:
  2. name: cortinacozinha
  3. platform: ESP8266
  4. board: nodemcuv2
  5.  
  6.  
  7. output:
  8. - platform: gpio
  9. pin: D3 # Output para Ponte H TB6612FNG - abertura
  10. id: 'OUTPUT_D3'
  11.  
  12. - platform: gpio
  13. pin: D4 # Output para Ponte H TB6612FNG - fecho
  14. id: 'OUTPUT_D4'
  15.  
  16. switch:
  17. - platform: output
  18. name: "ABERTURA CORTINA"
  19. output: 'OUTPUT_D3'
  20.  
  21. - platform: output
  22. name: "FECHO CORTINA"
  23. output: 'OUTPUT_D4'
  24.  
  25. binary_sensor:
  26.  
  27. - platform: gpio
  28. name: "Pin D5" # Input interruptor parede - abertura
  29. pin: D5
  30.  
  31. - platform: gpio
  32. name: "Pin D6" # Input interruptor parede - fecho
  33. pin: D6
  34.  
  35. - platform: gpio
  36. name: "Pin D7" # Input fim curso fechado
  37. pin: D7
  38.  
  39. - platform: gpio
  40. name: "Pin D2" # Input fim curso aberto
  41. pin: D2
  42.  
  43. cover:
  44. - platform: template
  45. name: "cortinacozinha"
  46. lambda: >-
  47. if (Pin_D2.high) {
  48. return cover::COVER_OPEN;
  49. } else {
  50. return cover::COVER_CLOSED;
  51. }
  52. optimistic: false
  53. open_action:
  54. - switch.turn_on:
  55. id: OUTPUT_D3
  56. - switch.turn_off:
  57. id: OUTPUT_D4
  58. close_action:
  59. - switch.turn_on:
  60. id: OUTPUT_D4
  61. - switch.turn_off:
  62. id: OUTPUT_D3
  63. stop_action:
  64. - switch.turn_off:
  65. id: OUTPUT_D3
  66. - switch.turn_off:
  67. id: OUTPUT_D4
  68.  
  69. wifi:
  70. ssid: 'Vodafone-F76ABE'
  71. password: 'BdQEuTA4NR'
  72.  
  73. mqtt:
  74. broker: '192.168.1.91'
  75. username: 'fred'
  76. password: 'fred'
  77.  
  78. # Enable logging
  79. logger:
  80.  
  81. ota:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement