tldr; I’m losing my mind at this point. Can someone point me at folder where addon caches the Github dependencies, please?
I have a Tasmota switch that I wanted to flash with ESPHome
After drafting a default configuration and pushing it to Github I flashed the switch and everything worked perfectly. I was able to adopt the switch into my HA via EPSHome addon
Then I wanted to add two number sensor to configure humidity thresholds from UI
So I modified the YAML, pushed updates to Github and tried to “refresh” the switch I already adopted (assuming that it supposed to dowload the most recent version from Github when I use menu Install in ESPHome addon)
Nothing changed
Then I tried to re-flash it with a binary via Web interface. It worked and I saw the new number sensors on the page after update.
But as soon as I hit Adopt button in HA’s ESPHome addon - the new firmware is being compiled and installed, and it is based on the previous (original version of the yaml from the Github).
Two threshold number sensors dissapeared after adoption, since during adoption ESPHome used the outdated (cached?) version of the yaml from the Github
Feels like ESPHome caches that damned yaml somewhere and I can’t find where.
I already tried cleaning build files - no effect.
My last resort would be renaming the yaml on a github and re-flashing the switch. Hopefully that will break this cycle, since ESPHome addon doesn’t have the new file cached yet.
If you want to force it to re-download from github, set refresh to 0d.
I don’t recall what the default is, but you can use the refresh parameter to tell it how long to keep the cached package for, or set refresh to 0 days to force it to re-download each time.
It’s a bit different than remote project and does not support configurable refresh.
Ideally I’d prefer to keep post-adopted YAML as is and just find the way to purge cached github://xyz/esphome-configs/foo-bar.yaml instead of tweaking in manually.
Otherwise I’ll have to do this for every single adoption of devices of that type, which is not user friendly and makes adoption/setup twice slower.
By default, single line package imports/adoptions are only re-downloaded once every 24 hours
The adopted single-line package can be replaced with a full schema package with custom refresh period
See Configuration Types — ESPHome
Build files and cached templates are stored in the addon’s folders in docker container.
Those files can be accessed if connected directly via ssh in /mnt/data/supervisor/addons/data/5c53de3b_esphome