mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-13 16:13:32 +02:00
Add clean build files command and auto-clean on version change (#181)
* Add clean build files command and auto-clean on version change * Update __main__.py
This commit is contained in:
@@ -124,6 +124,13 @@ class EsphomeyamlCleanMqttHandler(EsphomeyamlCommandWebSocket):
|
||||
return ["esphomeyaml", config_file, "clean-mqtt"]
|
||||
|
||||
|
||||
class EsphomeyamlCleanHandler(EsphomeyamlCommandWebSocket):
|
||||
def build_command(self, message):
|
||||
js = json.loads(message)
|
||||
config_file = os.path.join(CONFIG_DIR, js['configuration'])
|
||||
return ["esphomeyaml", config_file, "clean"]
|
||||
|
||||
|
||||
class SerialPortRequestHandler(BaseHandler):
|
||||
def get(self):
|
||||
if not self.is_authenticated():
|
||||
@@ -221,6 +228,7 @@ def make_app(debug=False):
|
||||
(r"/compile", EsphomeyamlCompileHandler),
|
||||
(r"/validate", EsphomeyamlValidateHandler),
|
||||
(r"/clean-mqtt", EsphomeyamlCleanMqttHandler),
|
||||
(r"/clean", EsphomeyamlCleanHandler),
|
||||
(r"/download.bin", DownloadBinaryRequestHandler),
|
||||
(r"/serial-ports", SerialPortRequestHandler),
|
||||
(r"/wizard.html", WizardRequestHandler),
|
||||
|
||||
Reference in New Issue
Block a user