[core] Update some coroutine priorities (#6755)

This commit is contained in:
Jesse Hills 2024-05-16 16:46:16 +12:00 committed by GitHub
parent 996f71c03c
commit 034c196ad8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 6 additions and 8 deletions

View File

@ -156,7 +156,7 @@ async def new_datetime(config, *args):
return var
@coroutine_with_priority(40.0)
@coroutine_with_priority(100.0)
async def to_code(config):
cg.add_define("USE_DATETIME")
cg.add_global(datetime_ns.using)

View File

@ -293,7 +293,7 @@ async def number_in_range_to_code(config, condition_id, template_arg, args):
return var
@coroutine_with_priority(40.0)
@coroutine_with_priority(100.0)
async def to_code(config):
cg.add_define("USE_NUMBER")
cg.add_global(number_ns.using)

View File

@ -76,7 +76,7 @@ BASE_OTA_SCHEMA = cv.Schema(
)
@coroutine_with_priority(50.0)
@coroutine_with_priority(51.0)
async def to_code(config):
cg.add_define("USE_OTA")

View File

@ -113,7 +113,7 @@ async def new_select(config, *, options: list[str]):
return var
@coroutine_with_priority(40.0)
@coroutine_with_priority(100.0)
async def to_code(config):
cg.add_define("USE_SELECT")
cg.add_global(select_ns.using)

View File

@ -912,7 +912,7 @@ def _lstsq(a, b):
return _mat_dot(_mat_dot(x, a_t), b)
@coroutine_with_priority(40.0)
@coroutine_with_priority(100.0)
async def to_code(config):
cg.add_define("USE_SENSOR")
cg.add_global(sensor_ns.using)

View File

@ -17,7 +17,6 @@ from esphome.const import (
CONF_YEAR,
)
from esphome.core import coroutine_with_priority
from .. import template_ns
CODEOWNERS = ["@rfdarter"]
@ -100,7 +99,6 @@ CONFIG_SCHEMA = cv.All(
)
@coroutine_with_priority(-100.0)
async def to_code(config):
var = await datetime.new_datetime(config)

View File

@ -108,7 +108,7 @@ async def new_text(
return var
@coroutine_with_priority(40.0)
@coroutine_with_priority(100.0)
async def to_code(config):
cg.add_define("USE_TEXT")
cg.add_global(text_ns.using)