mirror of
https://github.com/esphome/esphome.git
synced 2026-10-04 10:09:13 +00:00
[core] Replace magic coroutine priority numbers with self-documenting CoroPriority enum (#10518)
This commit is contained in:
@@ -101,7 +101,7 @@ from esphome.const import (
|
||||
DEVICE_CLASS_WIND_SPEED,
|
||||
ENTITY_CATEGORY_CONFIG,
|
||||
)
|
||||
from esphome.core import CORE, coroutine_with_priority
|
||||
from esphome.core import CORE, CoroPriority, coroutine_with_priority
|
||||
from esphome.core.entity_helpers import entity_duplicate_validator, setup_entity
|
||||
from esphome.cpp_generator import MockObjClass
|
||||
from esphome.util import Registry
|
||||
@@ -1142,6 +1142,6 @@ def _lstsq(a, b):
|
||||
return _mat_dot(_mat_dot(x, a_t), b)
|
||||
|
||||
|
||||
@coroutine_with_priority(100.0)
|
||||
@coroutine_with_priority(CoroPriority.CORE)
|
||||
async def to_code(config):
|
||||
cg.add_global(sensor_ns.using)
|
||||
|
||||
Reference in New Issue
Block a user