Yes, and the explanation in the docs doesnât tell me why this is in the YAML file. From what I read, I donât need anything in my local yaml file because itâs all in the imported file?
I can share my experience and hopefully clarify a few things. I have many Unity boards and theyâre all flashed with the same config. They end up clashing with each other when theyâre discovered by the ESPHome Dashboard (they all have the same hostname, logs cannot be accessed, OTA no longer work, etcâŚ)
However, when package_import_url is used it provides the ESPHome Dashboard with more insight and allows the user to âadoptâ the config. See screenshot below.
Once adopted, a basic config will be created for the device with the package pointing to the publicly accessible package_import_url.
Now there are 2 important properties that you should be aware of:
The name substitution is suffixed with the mac suffix. This fixes the issues with the duplicated hostnames (âunity.localâ becomes âunity-14350c.localâ). Without this substitution all devices will have the same hostname.
name_add_mac_suffix is set to false. This is done because the name substitution supersedes the benefits of name_add_mac_suffix, so there is no longer any use for it. However, this must be included to override the public config where it is set to true.
Hi, thanks for your clarification. Do you also know how to manage a structure with more nested yaml and folders to import? shall I create a remote package for each file? Unfortunately Iâm unaware how to link yaml located in subfolders.
In local it works great with includes. Thank you.
It doesnât look like it supports folder imports so youâll need to specify each file.
I would experiment with including the directory in the files list. If it works then it could save you some time. For example: [folderA/file1.yml, folderB/file2.yml]
Hi Loop,
I already tested the directory in this way [folderA/file1.yml, folderB/file2.yml] and it works. The problem is that I followed the nesting method provided by Jesse jesserockz/esphome-configs: My personal ESPHome config files (github.com) because I considered it would be used as a best practice in the further developement . It is a very smart method when you need to keep your configurations up to date with monthly esphome changelog.
a common configuration for frequently used entities I can include in an easy way where I need to
a separate folder with custom and unique configs related to the speficic device (filters, custom templates etc).
Jesseâs methos is great when used in local, unfortunately at this time wonât work with dashboard import, with packages and finally you could not apply to Made for ESPHome â ESPHome unless you import each file wich is a big pain and I donât think would let you to merge definitions properly.
As far as I notice, many hardware developers seems to be stuck at this point: Athom for instance has a unique long yaml for each device and as you can notice on their github they are stuck with last âfriendly_nameâ breaking change.
Unfortunately I havenât experienced these issues to be able to provide constructive advice My configuration is fairly simple in comparison to what youâre trying to achieve. It only uses one external component from git and it allows users to update whenever I make a change.
Sorry for replying to this older thread, but I have question that exactly fits to the following, because I have not completely understood the use of name_add_mac_suffix. I refer to the quoted post:
In my esp32.yaml (I have several ones for different projects), I use this:
Configurations imported with package_import_url typically contain name_add_mac_suffix: true. If you donât want it true in your local copy, simply override it with name_add_mac_suffix: false.
Apart from that: Does it make sense that I on the one hand import the package (and with import_full_config: true), whereas on the other hand I create my yaml further down all on my own?
imported package refer to some 3rd part yaml to be included in your own yaml.
Since i donât like that, i normally copy/paste (and if required edit) that yaml to my own needs.
In that way I am certain the yaml remains âas isâ, as the referred yaml might have some changes the next time i compile (and i donât get unwanted surprises)