Improve MQTT Callable
type hints (#87838)
This commit is contained in:
parent
1a35c2d805
commit
71b67e20e4
3 changed files with 5 additions and 5 deletions
|
@ -37,6 +37,7 @@ from .const import (
|
|||
from .debug_info import log_messages
|
||||
from .mixins import MQTT_ENTITY_COMMON_SCHEMA, MqttEntity, async_setup_entry_helper
|
||||
from .models import (
|
||||
MessageCallbackType,
|
||||
MqttCommandTemplate,
|
||||
MqttValueTemplate,
|
||||
PublishPayloadType,
|
||||
|
@ -173,7 +174,7 @@ class MqttTextEntity(MqttEntity, TextEntity):
|
|||
topics: dict[str, Any] = {}
|
||||
|
||||
def add_subscription(
|
||||
topics: dict[str, Any], topic: str, msg_callback: Callable
|
||||
topics: dict[str, Any], topic: str, msg_callback: MessageCallbackType
|
||||
) -> None:
|
||||
if self._config.get(topic) is not None:
|
||||
topics[topic] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue