diff --git a/esphome/components/datetime/__init__.py b/esphome/components/datetime/__init__.py index 3d08e4a6d0..262f1e2315 100644 --- a/esphome/components/datetime/__init__.py +++ b/esphome/components/datetime/__init__.py @@ -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) diff --git a/esphome/components/number/__init__.py b/esphome/components/number/__init__.py index 6d7ec97c90..8c3b15d22d 100644 --- a/esphome/components/number/__init__.py +++ b/esphome/components/number/__init__.py @@ -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) diff --git a/esphome/components/ota/__init__.py b/esphome/components/ota/__init__.py index 728d36f3fa..3d2956931c 100644 --- a/esphome/components/ota/__init__.py +++ b/esphome/components/ota/__init__.py @@ -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") diff --git a/esphome/components/select/__init__.py b/esphome/components/select/__init__.py index 7ad14f2440..1d234d5617 100644 --- a/esphome/components/select/__init__.py +++ b/esphome/components/select/__init__.py @@ -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) diff --git a/esphome/components/sensor/__init__.py b/esphome/components/sensor/__init__.py index ece232e1a6..ef5c4cc645 100644 --- a/esphome/components/sensor/__init__.py +++ b/esphome/components/sensor/__init__.py @@ -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) diff --git a/esphome/components/template/datetime/__init__.py b/esphome/components/template/datetime/__init__.py index 0c9447116f..746ab8a6f3 100644 --- a/esphome/components/template/datetime/__init__.py +++ b/esphome/components/template/datetime/__init__.py @@ -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) diff --git a/esphome/components/text/__init__.py b/esphome/components/text/__init__.py index c0140ff082..4ca055a730 100644 --- a/esphome/components/text/__init__.py +++ b/esphome/components/text/__init__.py @@ -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)