1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-10 15:22:24 +01:00

dashboard: Implement automatic ping fallback (#8263)

This commit is contained in:
J. Nick Koston
2025-02-27 15:17:07 +00:00
committed by GitHub
parent 63a7234767
commit 3048f303c5
10 changed files with 254 additions and 106 deletions

View File

@@ -45,7 +45,7 @@ from esphome.yaml_util import FastestAvailableSafeLoader
from .const import DASHBOARD_COMMAND
from .core import DASHBOARD
from .entries import EntryState, entry_state_to_bool
from .entries import UNKNOWN_STATE, entry_state_to_bool
from .util.file import write_file
from .util.subprocess import async_run_system_command
from .util.text import friendly_name_slugify
@@ -381,7 +381,7 @@ class EsphomeRenameHandler(EsphomeCommandWebSocket):
# Remove the old ping result from the cache
entries = DASHBOARD.entries
if entry := entries.get(self.old_name):
entries.async_set_state(entry, EntryState.UNKNOWN)
entries.async_set_state(entry, UNKNOWN_STATE)
class EsphomeUploadHandler(EsphomePortCommandWebSocket):