ESPHome CLI compile build_path problem

The CLI compile command…

esphome compile mynode.yaml

…does not compile into the same path as the web frontend of HA’s ESPHome add-on does. Instead it compiles into a sub-path “.pioenvs”. Both compilation ways obey my build_path setting, but the CLI version adds that sub-path below it.

As a result the CLI compile does not see the web frontend’s compile results. It downloads and compiles nodes again that have already been processed through the frontend.

Funny enough, the frontend seems to see the CLI compile results, although they are not in its normal compile destination. Nodes compiled through CLI are NOT marked with “Update available” any more in the frontend. They are shown as “Online” (= up-to-date).

Any ideas how I can force both worlds to use an identical compile path?

Hmmm. Looks my analysis was not correct:

After a run of CLI compile…

  • [build_path]/src/esphome contains the sources of all dependencies
  • [build_path]/.pioenvs/[nodename]/src/esphome contains the binaries of all dependencies

After a run of frontend compile…

  • [build_path]/src/esphome contains the sources of all dependencies

So where are the binaries in the second run?

I opened up an issue for this: