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

[core] Replace magic coroutine priority numbers with self-documenting CoroPriority enum (#10518)

This commit is contained in:
J. Nick Koston
2025-09-02 16:41:50 -05:00
committed by GitHub
parent f286bc57f3
commit d1276dc6df
57 changed files with 404 additions and 117 deletions

View File

@@ -10,7 +10,7 @@ from esphome.const import (
PLATFORM_LN882X,
PLATFORM_RTL87XX,
)
from esphome.core import CORE, coroutine_with_priority
from esphome.core import CORE, CoroPriority, coroutine_with_priority
AUTO_LOAD = ["web_server_base", "ota.web_server"]
DEPENDENCIES = ["wifi"]
@@ -40,7 +40,7 @@ CONFIG_SCHEMA = cv.All(
)
@coroutine_with_priority(64.0)
@coroutine_with_priority(CoroPriority.COMMUNICATION)
async def to_code(config):
paren = await cg.get_variable(config[CONF_WEB_SERVER_BASE_ID])