Allow skipping erasing on new installations (#102)

This commit is contained in:
Paulus Schoutsen 2021-11-10 20:02:19 -08:00 committed by GitHub
parent 65b0fab0c5
commit c0813275b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 1 deletions

View File

@ -267,6 +267,7 @@
"name": "ESPHome",
"version": "2021.11.0",
"home_assistant_domain": "esphome",
"new_install_skip_erase": false,
"builds": [
{
"chipFamily": "ESP32",
@ -297,6 +298,14 @@
optional key <code>home_assistant_domain</code>. If present, ESP Web
Tools will link the user to add this device to Home Assistant.
</p>
<p>
By default a new installation will erase the entire flash. If you want
to skip this step, set the optional key
<code>new_install_skip_erase</code> to <code>true</code>. ESP Web Tools
considers it a new installation if it is unable to detect the current
firmware of the device (via Improv Serial) or if the detected firmware
does not match the name specififed in the manifest.
</p>
<h3 id="improv">Wi-Fi provisioning</h3>
<p>
ESP Web Tools has support for the

View File

@ -16,6 +16,7 @@ export interface Manifest {
name: string;
version: string;
home_assistant_domain?: string;
new_install_skip_erase?: boolean;
builds: Build[];
}

View File

@ -580,7 +580,7 @@ class EwtInstallDialog extends LitElement {
// When it can't detect improv (ie because install failed)
// We shouldn't reset settings but instead show the error
if (this._state !== "INSTALL") {
this._startInstall(true);
this._startInstall(!this._manifest.new_install_skip_erase);
}
}
}

View File

@ -2,6 +2,7 @@
"name": "ESPHome",
"version": "2021.11.0-dev",
"home_assistant_domain": "esphome",
"new_install_skip_erase": true,
"builds": [
{
"chipFamily": "ESP32",