mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Correct type hints on MQTT tests (#128299)
This commit is contained in:
@@ -1486,7 +1486,7 @@ async def test_encoding_subscribable_topics(
|
||||
attribute_value: Any,
|
||||
) -> None:
|
||||
"""Test handling of incoming encoded payload."""
|
||||
config = copy.deepcopy(DEFAULT_CONFIG[mqtt.DOMAIN][fan.DOMAIN])
|
||||
config: dict[str, Any] = copy.deepcopy(DEFAULT_CONFIG[mqtt.DOMAIN][fan.DOMAIN])
|
||||
config[ATTR_PRESET_MODES] = ["eco", "auto"]
|
||||
config[CONF_PRESET_MODE_COMMAND_TOPIC] = "fan/some_preset_mode_command_topic"
|
||||
config[CONF_PERCENTAGE_COMMAND_TOPIC] = "fan/some_percentage_command_topic"
|
||||
@@ -2201,7 +2201,7 @@ async def test_publishing_with_custom_encoding(
|
||||
) -> None:
|
||||
"""Test publishing MQTT payload with different encoding."""
|
||||
domain = fan.DOMAIN
|
||||
config = copy.deepcopy(DEFAULT_CONFIG)
|
||||
config: dict[str, Any] = copy.deepcopy(DEFAULT_CONFIG)
|
||||
if topic == "preset_mode_command_topic":
|
||||
config[mqtt.DOMAIN][domain]["preset_modes"] = ["auto", "eco"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user