From a4545863ce13d8cdea2a76e632bf148e09b241da Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 14 Nov 2023 13:45:54 -0600 Subject: [PATCH] rename run_command to build_device_command since it does not actually run anything --- esphome/dashboard/dashboard.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/dashboard/dashboard.py b/esphome/dashboard/dashboard.py index 8da951781e..d7d11d8693 100644 --- a/esphome/dashboard/dashboard.py +++ b/esphome/dashboard/dashboard.py @@ -409,7 +409,7 @@ DASHBOARD_COMMAND = ["esphome", "--dashboard"] class EsphomePortCommandWebSocket(EsphomeCommandWebSocket): """Base class for commands that require a port.""" - async def run_command( + async def build_device_command( self, args: list[str], json_message: dict[str, Any] ) -> list[str]: """Build the command to run.""" @@ -436,7 +436,7 @@ class EsphomePortCommandWebSocket(EsphomeCommandWebSocket): class EsphomeLogsHandler(EsphomePortCommandWebSocket): async def build_command(self, json_message: dict[str, Any]) -> list[str]: """Build the command to run.""" - return await self.run_command(["logs"], json_message) + return await self.build_device_command(["logs"], json_message) class EsphomeRenameHandler(EsphomeCommandWebSocket): @@ -465,13 +465,13 @@ class EsphomeRenameHandler(EsphomeCommandWebSocket): class EsphomeUploadHandler(EsphomePortCommandWebSocket): async def build_command(self, json_message: dict[str, Any]) -> list[str]: """Build the command to run.""" - return await self.run_command(["upload"], json_message) + return await self.build_device_command(["upload"], json_message) class EsphomeRunHandler(EsphomePortCommandWebSocket): async def build_command(self, json_message: dict[str, Any]) -> list[str]: """Build the command to run.""" - return await self.run_command(["run"], json_message) + return await self.build_device_command(["run"], json_message) class EsphomeCompileHandler(EsphomeCommandWebSocket):