diff options
Diffstat (limited to 'esphome/config/couchlight.yaml')
| -rw-r--r-- | esphome/config/couchlight.yaml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/esphome/config/couchlight.yaml b/esphome/config/couchlight.yaml new file mode 100644 index 0000000..08affc1 --- /dev/null +++ b/esphome/config/couchlight.yaml | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | esphome: | ||
| 2 | name: couchlight | ||
| 3 | platform: ESP8266 | ||
| 4 | board: d1_mini | ||
| 5 | |||
| 6 | # Enable logging | ||
| 7 | logger: | ||
| 8 | |||
| 9 | # Enable Home Assistant API | ||
| 10 | api: | ||
| 11 | password: !secret api_password | ||
| 12 | |||
| 13 | # OTA | ||
| 14 | ota: | ||
| 15 | password: !secret ota_password | ||
| 16 | |||
| 17 | # WiFi Credentials | ||
| 18 | wifi: | ||
| 19 | ssid: !secret wifi_ssid | ||
| 20 | password: !secret wifi_password | ||
| 21 | |||
| 22 | # Enable fallback hotspot (captive portal) in case wifi connection fails | ||
| 23 | ap: | ||
| 24 | ssid: "Couchlight Fallback Hotspot" | ||
| 25 | password: !secret wifi_ap_password | ||
| 26 | |||
| 27 | captive_portal: | ||
| 28 | |||
| 29 | light: | ||
| 30 | - id: light1 | ||
| 31 | platform: binary | ||
| 32 | name: "Couch 1" | ||
| 33 | output: relay_light1 | ||
| 34 | |||
| 35 | - id: light2 | ||
| 36 | platform: binary | ||
| 37 | name: "Couch 2" | ||
| 38 | output: relay_light2 | ||
| 39 | |||
| 40 | output: | ||
| 41 | - id: relay_light1 | ||
| 42 | platform: gpio | ||
| 43 | pin: D1 | ||
| 44 | |||
| 45 | - id: relay_light2 | ||
| 46 | platform: gpio | ||
| 47 | pin: D2 | ||
| 48 | |||
| 49 | binary_sensor: | ||
| 50 | - id: button_light1 | ||
| 51 | name: "Couch 1 PushButton" | ||
| 52 | platform: gpio | ||
| 53 | pin: | ||
| 54 | number: D5 | ||
| 55 | mode: INPUT_PULLUP | ||
| 56 | filters: | ||
| 57 | - invert | ||
| 58 | - delayed_on: 50ms | ||
| 59 | on_press: | ||
| 60 | then: | ||
| 61 | - light.toggle: light1 | ||
| 62 | internal: true # hide from UI | ||
| 63 | |||
| 64 | - id: button_light2 | ||
| 65 | name: "Couch 2 PushButton" | ||
| 66 | platform: gpio | ||
| 67 | pin: | ||
| 68 | number: D6 | ||
| 69 | mode: INPUT_PULLUP | ||
| 70 | filters: | ||
| 71 | - invert | ||
| 72 | - delayed_on: 50ms | ||
| 73 | on_press: | ||
| 74 | then: | ||
| 75 | - light.toggle: light2 | ||
| 76 | internal: true # hide from UI | ||
