summaryrefslogtreecommitdiffstats
path: root/esphome/config/office-pc-control.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'esphome/config/office-pc-control.yaml')
-rw-r--r--esphome/config/office-pc-control.yaml43
1 files changed, 35 insertions, 8 deletions
diff --git a/esphome/config/office-pc-control.yaml b/esphome/config/office-pc-control.yaml
index 92d78d6..30033bb 100644
--- a/esphome/config/office-pc-control.yaml
+++ b/esphome/config/office-pc-control.yaml
@@ -1,5 +1,11 @@
1substitutions:
2 device_name: office-pc-control
3 friendly_name: "Office PC Control"
4
5
1esphome: 6esphome:
2 name: office-pc-control 7 name: ${device_name}
8 friendly_name: ${friendly_name}
3 area: Office 9 area: Office
4 on_boot: 10 on_boot:
5 priority: -100 11 priority: -100
@@ -40,7 +46,7 @@ wifi:
40 46
41 # Enable fallback hotspot (captive portal) in case wifi connection fails 47 # Enable fallback hotspot (captive portal) in case wifi connection fails
42 ap: 48 ap:
43 ssid: "Couchlight Fallback Hotspot" 49 ssid: "${device_name} Hotspot"
44 password: !secret wifi_ap_password 50 password: !secret wifi_ap_password
45 51
46captive_portal: 52captive_portal:
@@ -49,15 +55,36 @@ output:
49 - platform: gpio 55 - platform: gpio
50 id: pc_reset 56 id: pc_reset
51 pin: 57 pin:
52 number: D2 58 number: D2 # GPIO4
53 inverted: true # pc power/reset pins are GND activated 59 inverted: true # pc power/reset pins are GND activated
54 60
55 - platform: gpio 61 - platform: gpio
56 id: pc_power_onoff 62 id: pc_power_onoff
57 pin: 63 pin:
58 number: D3 64 number: D3 # GPIO0
59 inverted: true # pc power/reset pins are GND activated 65 inverted: true # pc power/reset pins are GND activated
60 66
67 - platform: gpio
68 id: unused_gpio1
69 pin:
70 number: TX # GPIO1
71 mode: INPUT_PULLUP
72 - platform: gpio
73 id: unused_gpio3
74 pin:
75 number: RX # GPIO3
76 mode: INPUT_PULLUP
77 - platform: gpio
78 id: unused_gpio13
79 pin:
80 number: D7 # GPIO13
81 mode: INPUT_PULLUP
82 - platform: gpio
83 id: unused_gpio16
84 pin:
85 number: D0 # GPIO16
86 mode: INPUT_PULLDOWN
87
61button: 88button:
62 - platform: output 89 - platform: output
63 name: "Reset" 90 name: "Reset"
@@ -103,7 +130,7 @@ binary_sensor:
103 name: "Touch button" 130 name: "Touch button"
104 id: touch_button 131 id: touch_button
105 pin: 132 pin:
106 number: D8 133 number: D8 # GPIO15
107 mode: INPUT 134 mode: INPUT
108 internal: true 135 internal: true
109 filters: 136 filters:
@@ -116,7 +143,7 @@ binary_sensor:
116 name: "Power button" 143 name: "Power button"
117 id: power_button 144 id: power_button
118 pin: 145 pin:
119 number: D5 146 number: D5 # GPIO14
120 mode: INPUT_PULLUP 147 mode: INPUT_PULLUP
121 inverted: true 148 inverted: true
122 internal: true 149 internal: true
@@ -142,7 +169,7 @@ binary_sensor:
142 name: "Reset button" 169 name: "Reset button"
143 id: reset_button 170 id: reset_button
144 pin: 171 pin:
145 number: D6 172 number: D6 # GPIO12
146 mode: INPUT_PULLUP 173 mode: INPUT_PULLUP
147 inverted: true 174 inverted: true
148 internal: true 175 internal: true
@@ -174,7 +201,7 @@ binary_sensor:
174 name: "Powered" 201 name: "Powered"
175 icon: "mdi:desktop-tower" 202 icon: "mdi:desktop-tower"
176 pin: 203 pin:
177 number: D1 204 number: D1 # GPIO5
178 mode: INPUT_PULLUP 205 mode: INPUT_PULLUP
179 filters: 206 filters:
180 - delayed_on: 100ms 207 - delayed_on: 100ms