Skip to content

Commit b2da487

Browse files
committed
describe how ESPHome packages work and give an example
1 parent b3b4547 commit b2da487

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,33 @@ TODO
9494
## Full ESPHome configuration
9595
9696
See the [main.yaml](./main.yaml) file.
97+
Please note that this is an [ESPHome package](https://esphome.io/components/packages/) and thus it uses [substitutions](https://esphome.io/components/substitutions/) to make the YAML config file as reusable as possible.
98+
99+
An actual ESPHome YAML config using this package could be:
100+
101+
```yaml
102+
packages:
103+
remote_package_files:
104+
url: https://github.com/f18m/floor-heating-controller/
105+
files:
106+
- path: main.yaml
107+
vars:
108+
encryption_key: !secret encryption_key
109+
wifi_ssid: !secret wifi_ssid
110+
wifi_password: !secret wifi_password
111+
wifi_ap_password: !secret wifi_ap_password
112+
ota_password: !secret ota_password
113+
ref: main # optional
114+
refresh: 1d # optional
115+
116+
esphome:
117+
name: "floorheating-p0"
118+
friendly_name: FloorHeatingActuatorController-P0
119+
```
120+
121+
which is basically assigning the secrets defined in the ESPHome global "secrets.yaml" to the variables of this package.
122+
Then it's overriding just the name & friendly name from the package.
123+
97124
98125
## Similar projects
99126

0 commit comments

Comments
 (0)