mirror of
https://github.com/esphome/esphome.git
synced 2025-02-15 01:18:16 +00:00
Merge branch 'mdns_cache' into integration
This commit is contained in:
commit
afdb371b86
@ -407,7 +407,7 @@ DASHBOARD_COMMAND = ["esphome", "--dashboard"]
|
|||||||
class EsphomePortCommandWebSocket(EsphomeCommandWebSocket):
|
class EsphomePortCommandWebSocket(EsphomeCommandWebSocket):
|
||||||
"""Base class for commands that require a port."""
|
"""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]
|
self, args: list[str], json_message: dict[str, Any]
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
"""Build the command to run."""
|
"""Build the command to run."""
|
||||||
@ -434,7 +434,7 @@ class EsphomePortCommandWebSocket(EsphomeCommandWebSocket):
|
|||||||
class EsphomeLogsHandler(EsphomePortCommandWebSocket):
|
class EsphomeLogsHandler(EsphomePortCommandWebSocket):
|
||||||
async def build_command(self, json_message: dict[str, Any]) -> list[str]:
|
async def build_command(self, json_message: dict[str, Any]) -> list[str]:
|
||||||
"""Build the command to run."""
|
"""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):
|
class EsphomeRenameHandler(EsphomeCommandWebSocket):
|
||||||
@ -463,13 +463,13 @@ class EsphomeRenameHandler(EsphomeCommandWebSocket):
|
|||||||
class EsphomeUploadHandler(EsphomePortCommandWebSocket):
|
class EsphomeUploadHandler(EsphomePortCommandWebSocket):
|
||||||
async def build_command(self, json_message: dict[str, Any]) -> list[str]:
|
async def build_command(self, json_message: dict[str, Any]) -> list[str]:
|
||||||
"""Build the command to run."""
|
"""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):
|
class EsphomeRunHandler(EsphomePortCommandWebSocket):
|
||||||
async def build_command(self, json_message: dict[str, Any]) -> list[str]:
|
async def build_command(self, json_message: dict[str, Any]) -> list[str]:
|
||||||
"""Build the command to run."""
|
"""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):
|
class EsphomeCompileHandler(EsphomeCommandWebSocket):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user