Updated Creating Your First Device in Home Assistant ‐ ESPHome (markdown)
@@ -20,7 +20,9 @@ Using Home Assistant, with integrated ESPHome, you are easily able to create a n
|
|||||||
|
|
||||||
Home Assistant (ESPHome), devices use .yaml code, which is initially flashed to the board via USB cable.
|
Home Assistant (ESPHome), devices use .yaml code, which is initially flashed to the board via USB cable.
|
||||||
|
|
||||||
Once flashed (so the board is 'talking' to Home Assistant'), you can then subsequently easily reflash to the board using OTA, Over-The-Air, via Wi-Fi. USB re-flashing remains an option if needed.
|
Once flashed (so the board is 'talking' to Home Assistant'), you can then subsequently easily reflash to the board using OTA, Over-The-Air, via Wi-Fi.
|
||||||
|
|
||||||
|
USB re-flashing remains an option if needed.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -37,7 +39,7 @@ DitroniX External Components are located in
|
|||||||
|
|
||||||
#### DitroniX Component Development
|
#### DitroniX Component Development
|
||||||
|
|
||||||
During DitroniX Home Assistant Code Development, the required device 'Component', is simply connected to the DitroniX git repository, as an external component.
|
During DitroniX Home Assistant Code Development, the required device 'Component', is simply connected to the DitroniX git (GitHub), repository, as an external component.
|
||||||
|
|
||||||
|
|
||||||
You could of course, always 'clone' this component and make your own.
|
You could of course, always 'clone' this component and make your own.
|
||||||
@@ -74,7 +76,7 @@ ESPHome configuration for a device lives in a .yaml file. Within this YAML file
|
|||||||
|
|
||||||
If not already configured, I would recommend you setup your 'secrets' file. Within YAML , this is `<<: !include ../secrets.yaml`
|
If not already configured, I would recommend you setup your 'secrets' file. Within YAML , this is `<<: !include ../secrets.yaml`
|
||||||
|
|
||||||
To configure the secrets file, you need to
|
To configure the secrets file, you need to:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -84,7 +86,7 @@ Edit the Wi-Fi settings and lick 'Save'. That is it, all done!
|
|||||||
|
|
||||||
#### YAML
|
#### YAML
|
||||||
|
|
||||||
YAML is designed to be human-readable and easy to edit. However, like all programming languages, it has it oddities and quirky
|
YAML is designed to be human-readable and easy to edit. However, like all programming languages, it has it's oddities and quirky gotchas.
|
||||||
|
|
||||||
- You can **only use spaces** for indentation
|
- You can **only use spaces** for indentation
|
||||||
- Using the `**[Tab] key is strictly forbidden** and can cause parser errors or unexpected block merges
|
- Using the `**[Tab] key is strictly forbidden** and can cause parser errors or unexpected block merges
|
||||||
@@ -179,3 +181,11 @@ You may now add the device to your normal Home Assistant dash and select require
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
#### Finally, once your device is up and running, you can always tweak or edit the YAML code, then reflash, at any time.
|
||||||
|
|
||||||
|
You can even duplicate the code for another device.
|
||||||
|
|
||||||
|
Remember though, each device has it's own unique 'api key', 'ota password' and 'ap fallback password'. The rest of the code can be duplicated across your devices, where needed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user