Add ESPHome version to generated platformio.ini (#4443)

* Add ESPHome version to generated platformio.ini

* Move description to platformio section
This commit is contained in:
Jesse Hills 2023-02-16 13:27:32 +13:00
parent 1447536906
commit 44494ad18e
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -142,7 +142,10 @@ def get_ini_content():
# Sort to avoid changing build flags order
CORE.add_platformio_option("build_flags", sorted(CORE.build_flags))
content = f"[env:{CORE.name}]\n"
content = "[platformio]\n"
content += f"description = ESPHome {__version__}\n"
content += f"[env:{CORE.name}]\n"
content += format_ini(CORE.platformio_options)
return content