Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphomeyaml:
- name: cortinacozinha
- platform: ESP8266
- board: nodemcuv2
- output:
- - platform: gpio
- pin: D3 # Output para Ponte H TB6612FNG - abertura
- id: 'OUTPUT_D3'
- - platform: gpio
- pin: D4 # Output para Ponte H TB6612FNG - fecho
- id: 'OUTPUT_D4'
- switch:
- - platform: output
- name: "ABERTURA CORTINA"
- output: 'OUTPUT_D3'
- - platform: output
- name: "FECHO CORTINA"
- output: 'OUTPUT_D4'
- binary_sensor:
- - platform: gpio
- name: "Pin D5" # Input interruptor parede - abertura
- pin: D5
- - platform: gpio
- name: "Pin D6" # Input interruptor parede - fecho
- pin: D6
- - platform: gpio
- name: "Pin D7" # Input fim curso fechado
- pin: D7
- - platform: gpio
- name: "Pin D2" # Input fim curso aberto
- pin: D2
- cover:
- - platform: template
- name: "cortinacozinha"
- lambda: >-
- if (Pin_D2.high) {
- return cover::COVER_OPEN;
- } else {
- return cover::COVER_CLOSED;
- }
- optimistic: false
- open_action:
- - switch.turn_on:
- id: OUTPUT_D3
- - switch.turn_off:
- id: OUTPUT_D4
- close_action:
- - switch.turn_on:
- id: OUTPUT_D4
- - switch.turn_off:
- id: OUTPUT_D3
- stop_action:
- - switch.turn_off:
- id: OUTPUT_D3
- - switch.turn_off:
- id: OUTPUT_D4
- wifi:
- ssid: 'Vodafone-F76ABE'
- password: 'BdQEuTA4NR'
- mqtt:
- broker: '192.168.1.91'
- username: 'fred'
- password: 'fred'
- # Enable logging
- logger:
- ota:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement