mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 16:25:50 +00:00
[core] Replace magic coroutine priority numbers with self-documenting CoroPriority enum (#10518)
This commit is contained in:
@@ -57,7 +57,7 @@ from esphome.const import (
|
||||
PLATFORM_ESP8266,
|
||||
PlatformFramework,
|
||||
)
|
||||
from esphome.core import CORE, coroutine_with_priority
|
||||
from esphome.core import CORE, CoroPriority, coroutine_with_priority
|
||||
|
||||
DEPENDENCIES = ["network"]
|
||||
|
||||
@@ -321,7 +321,7 @@ def exp_mqtt_message(config):
|
||||
)
|
||||
|
||||
|
||||
@coroutine_with_priority(40.0)
|
||||
@coroutine_with_priority(CoroPriority.WEB)
|
||||
async def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await cg.register_component(var, config)
|
||||
|
||||
Reference in New Issue
Block a user