Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.71 KB | None | 0 0
  1.  
  2. substitutions:
  3.   name: mbedroom_cover_left
  4.  
  5. esphome:
  6.   name: ${name}
  7.   platform: ESP8266
  8.   board: esp01_1m
  9.  
  10. wifi:
  11.   ssid: XXXXXX
  12.   password: XXXXXXX
  13.   domain: XXXXXX
  14.   manual_ip:
  15.     static_ip: XXX.XXX.XXX.XXX
  16.     gateway: XXX.XXX.XXX.XXX
  17.     subnet: XXX.XXX.XXX.XXX
  18.    
  19. web_server:
  20.   port: 80
  21.  
  22. # Enable logging
  23. logger:
  24. # Enable Home Assistant API
  25. api:
  26. ota:
  27. time:
  28.   - platform: homeassistant
  29.     id: homeassistant_time
  30.  
  31. switch:
  32.  # The switch that turns the UP direction on
  33.   - platform: gpio
  34.     id: up_pin
  35.     pin: GPIO13
  36.     interlock: &interlock_group [up_pin, down_pin]
  37.     restore_mode: always off
  38.  
  39.   # The switch that turns the DOWN direction on
  40.   - platform: gpio
  41.     id: down_pin
  42.     pin: GPIO15
  43.     interlock: *interlock_group
  44.     restore_mode: always off
  45.  
  46. cover:
  47.   - platform: time_based
  48.     name: "Master Bedroom left curtain"
  49.     id: "${name}"
  50.  
  51.     open_action:
  52.       - switch.turn_on: up_pin
  53.     open_duration: 22sec
  54.  
  55.     close_action:
  56.       - switch.turn_on: down_pin
  57.     close_duration: 16sec
  58.  
  59.     stop_action:
  60.       - switch.turn_off: up_pin
  61.       - switch.turn_off: down_pin
  62.  
  63. binary_sensor:
  64.   - platform: gpio
  65.     id: open_button
  66.     pin: GPIO12
  67.     on_press:
  68.       - cover.open: "${name}"
  69.   - platform: gpio
  70.     id: close_button
  71.     pin: GPIO05
  72.     on_press:
  73.       - cover.close: "${name}"
  74.   - platform: gpio
  75.     id: stop_button
  76.     pin: GPIO03
  77.     on_press:
  78.       - cover.stop: "${name}"
  79.      
  80. output:
  81. - platform: esp8266_pwm
  82.   id: green_led_up
  83.   pin: GPIO0
  84.   inverted: false
  85. - platform: esp8266_pwm
  86.   id: red_led_down
  87.   pin: GPIO02
  88.   inverted: false
  89. - platform: esp8266_pwm
  90.   id: blue_led_down
  91.   pin: GPIO01
  92.   inverted: false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement