Skip to content

Commit de21eea

Browse files
committed
Allow more customizations on relay names
1 parent f7fe73c commit de21eea

File tree

2 files changed

+46
-9
lines changed

2 files changed

+46
-9
lines changed

example-instance-with-different-sensors.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ packages:
99
wifi_password: "supersecretpassword"
1010
wifi_ap_password: "deadbeefdead"
1111
ota_password: "deadbeefdeadbeefdeadbeefdeadbeef"
12+
relay1_name: "Living Room Relay"
13+
relay2_name: "Bedroom Relay"
14+
relay3_name: "Kitchen Relay"
15+
relay4_name: "Bathroom Relay"
16+
relay5_name: "Dining Room Relay"
17+
relay6_name: "Office Relay"
18+
relay7_name: "Guest Room Relay"
19+
relay8_name: "Hallway Relay"
20+
1221
ref: main # optional
1322
refresh: 1d # optional
1423

main.yaml

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
1+
#
2+
# Floor Heating Actuator Controller
3+
# ESPHome PACKAGE configuration file
4+
# See https://esphome.io/components/packages/
5+
#
6+
7+
# Package available substitutions
8+
substitutions:
9+
relay1_name: "Relay1"
10+
relay2_name: "Relay2"
11+
relay3_name: "Relay3"
12+
relay4_name: "Relay4"
13+
relay5_name: "Relay5"
14+
relay6_name: "Relay6"
15+
relay7_name: "Relay7"
16+
relay8_name: "Relay8"
17+
encryption_key: "your_encryption_key_here"
18+
ota_password: "your_ota_password_here"
19+
wifi_ssid: "your_wifi_ssid_here"
20+
wifi_password: "your_wifi_password_here"
21+
wifi_ap_password: "your_wifi_ap_password_here"
22+
23+
# You might want to override this:
124
esphome:
225
name: floorheatingactuatorcontroller
326
friendly_name: FloorHeatingActuatorController
427

28+
# Board
529
esp32:
630
board: esp32dev
731
framework:
@@ -15,10 +39,11 @@ api:
1539
encryption:
1640
key: ${encryption_key}
1741

42+
43+
# Wireless Connectivity:
1844
ota:
1945
- platform: esphome
2046
password: ${ota_password}
21-
2247
wifi:
2348
ssid: ${wifi_ssid}
2449
password: ${wifi_password}
@@ -28,6 +53,7 @@ wifi:
2853
ssid: "Floorheatingactuatorcontroller"
2954
password: ${wifi_ap_password}
3055

56+
# Extra sensors:
3157
text_sensor:
3258
- platform: wifi_info
3359
ip_address:
@@ -58,6 +84,7 @@ spi:
5884
miso_pin: GPIO16
5985
clk_pin: GPIO17
6086

87+
# Temperature sensors
6188
sensor:
6289
# Temperature sensor on SPI, see https://esphome.io/components/sensor/max6675/
6390
- platform: max6675
@@ -81,32 +108,33 @@ sensor:
81108
name: "Ambient Humidity"
82109
update_interval: 60s
83110

111+
# Main relays controlling the floor heating zones
84112
switch:
85113
# relays use GPIOS 12-14, 23,25-27, 32-33
86114
- platform: gpio
87115
name: "LED"
88116
pin: GPIO23
89117
- platform: gpio
90-
name: "Relay1"
118+
name: ${relay1_name}
91119
pin: GPIO13
92120
- platform: gpio
93-
name: "Relay2"
121+
name: ${relay2_name}
94122
pin: GPIO12
95123
- platform: gpio
96-
name: "Relay3"
124+
name: ${relay3_name}
97125
pin: GPIO14
98126
- platform: gpio
99-
name: "Relay4"
127+
name: ${relay4_name}
100128
pin: GPIO27
101129
- platform: gpio
102-
name: "Relay5"
130+
name: ${relay5_name}
103131
pin: GPIO26
104132
- platform: gpio
105-
name: "Relay6"
133+
name: ${relay6_name}
106134
pin: GPIO25
107135
- platform: gpio
108-
name: "Relay7"
136+
name: ${relay7_name}
109137
pin: GPIO33
110138
- platform: gpio
111-
name: "Relay8"
139+
name: ${relay8_name}
112140
pin: GPIO32

0 commit comments

Comments
 (0)