I’m using the latest version of the ESPhome device builder.
I want to add a .h include file to a project.
I know I have to link it in the main esphome section:
esphome:
includes:
- usb_relay.h
but where do I put that .h file? should I upload it via web GUI? I don’t see any way to do that.
Go to the Configuration tab of the app and scroll down to the ssh section.
Set the username to root.
Type in a password of your choice.
Set sftp to true (enable).
Set compatibility_mode to true (enable).
Click Save.
Now you have access to your Home Assistant environment via SSH and SFTP.
If you use Linux, you can access it via the terminal using ssh and scp. If you prefer Windows, you can run ssh and scp directly from the Command Prompt (cmd) or PowerShell. If you prefer a graphical user interface (GUI), I highly recommend using WinSCP.
Once you can see the file listing in your Home Assistant environment, you will find your ESPHome files under the config/esphome directory.
Another option: Create a new file using the simple File Editor integration and cut, paste and save it to your server location direct from the GUI. Simplez!
Gotcha: bet your included file has other includes. It gets messy. Try the Arduino IDF option.