Improve MQTT Callable type hints (#87838)

This commit is contained in:
Jan Bouwhuis 2023-02-12 21:24:59 +01:00 committed by GitHub
parent 1a35c2d805
commit 71b67e20e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -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] = {