From c798e4d7f57a1397999442ba7a1a5f346b7be706 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Thu, 31 Oct 2024 17:23:32 +0100 Subject: [PATCH 1/2] fix --- esphome/components/datetime/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/datetime/__init__.py b/esphome/components/datetime/__init__.py index 7edf527e01..23dbf83732 100644 --- a/esphome/components/datetime/__init__.py +++ b/esphome/components/datetime/__init__.py @@ -70,8 +70,6 @@ def _validate_time_present(config): _DATETIME_SCHEMA = cv.ENTITY_BASE_SCHEMA.extend( - web_server.WEBSERVER_SORTING_SCHEMA, - cv.MQTT_COMMAND_COMPONENT_SCHEMA, cv.Schema( { cv.Optional(CONF_ON_VALUE): automation.validate_automation( @@ -81,7 +79,9 @@ _DATETIME_SCHEMA = cv.ENTITY_BASE_SCHEMA.extend( ), cv.Optional(CONF_TIME_ID): cv.use_id(time.RealTimeClock), } - ), + ) + .add_extra(web_server.WEBSERVER_SORTING_SCHEMA) + .add_extra(cv.MQTT_COMMAND_COMPONENT_SCHEMA), ).add_extra(_validate_time_present) From f03e435be88bc55597302b5051c271cb0020ca17 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Thu, 31 Oct 2024 17:45:32 +0100 Subject: [PATCH 2/2] fix --- esphome/components/datetime/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/datetime/__init__.py b/esphome/components/datetime/__init__.py index 23dbf83732..630bf6962c 100644 --- a/esphome/components/datetime/__init__.py +++ b/esphome/components/datetime/__init__.py @@ -80,8 +80,8 @@ _DATETIME_SCHEMA = cv.ENTITY_BASE_SCHEMA.extend( cv.Optional(CONF_TIME_ID): cv.use_id(time.RealTimeClock), } ) - .add_extra(web_server.WEBSERVER_SORTING_SCHEMA) - .add_extra(cv.MQTT_COMMAND_COMPONENT_SCHEMA), + .extend(web_server.WEBSERVER_SORTING_SCHEMA) + .extend(cv.MQTT_COMMAND_COMPONENT_SCHEMA) ).add_extra(_validate_time_present)