mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 15:18:16 +00:00
tweak
This commit is contained in:
parent
d2b85e8b9a
commit
93f4ec7b64
@ -197,9 +197,9 @@ class DashboardEntries:
|
|||||||
bus.async_fire(EVENT_ENTRY_REMOVED, {"entry": entry})
|
bus.async_fire(EVENT_ENTRY_REMOVED, {"entry": entry})
|
||||||
|
|
||||||
for entry in updated:
|
for entry in updated:
|
||||||
if original_names[entry] != entry.name:
|
if (original_name := original_names[entry]) != (current_name := entry.name):
|
||||||
name_to_entry[original_names[entry]].discard(entry.path)
|
name_to_entry[original_name].discard(entry.path)
|
||||||
name_to_entry[entry.name].add(entry.path)
|
name_to_entry[current_name].add(entry.path)
|
||||||
bus.async_fire(EVENT_ENTRY_UPDATED, {"entry": entry})
|
bus.async_fire(EVENT_ENTRY_UPDATED, {"entry": entry})
|
||||||
|
|
||||||
def _get_path_to_cache_key(self) -> dict[str, DashboardCacheKeyType]:
|
def _get_path_to_cache_key(self) -> dict[str, DashboardCacheKeyType]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user