diff --git a/esphome/components/mdns/__init__.py b/esphome/components/mdns/__init__.py index 6b4578ac23..4776bef22f 100644 --- a/esphome/components/mdns/__init__.py +++ b/esphome/components/mdns/__init__.py @@ -13,6 +13,7 @@ from esphome.const import ( ) from esphome.core import CORE, Lambda, coroutine_with_priority from esphome.coroutine import CoroPriority +from esphome.types import ConfigType CODEOWNERS = ["@esphome/core"] DEPENDENCIES = ["network"] @@ -47,7 +48,7 @@ SERVICE_SCHEMA = cv.Schema( ) -def _consume_mdns_sockets(config): +def _consume_mdns_sockets(config: ConfigType) -> ConfigType: """Register socket needs for mDNS component.""" if config.get(CONF_DISABLED): return config diff --git a/esphome/components/mqtt/__init__.py b/esphome/components/mqtt/__init__.py index 3866e09a24..641c70a367 100644 --- a/esphome/components/mqtt/__init__.py +++ b/esphome/components/mqtt/__init__.py @@ -58,6 +58,7 @@ from esphome.const import ( PlatformFramework, ) from esphome.core import CORE, CoroPriority, coroutine_with_priority +from esphome.types import ConfigType DEPENDENCIES = ["network"] @@ -210,7 +211,7 @@ def validate_fingerprint(value): return value -def _consume_mqtt_sockets(config): +def _consume_mqtt_sockets(config: ConfigType) -> ConfigType: """Register socket needs for MQTT component.""" from esphome.components import socket