Announce a deprecated callback for MQTT subscribe will stop working (#82610)

* Announce a deprecated callback will stop working

* Use 2 months grace period

* Use 2 months grace period

* Use 2 months grace period

* Add deprecation comment to tests
This commit is contained in:
Jan Bouwhuis
2022-11-25 10:22:12 +01:00
committed by GitHub
parent a4dbb9a24e
commit 01b0f4d565
2 changed files with 6 additions and 1 deletions

View File

@@ -882,6 +882,7 @@ async def test_subscribe_bad_topic(
await mqtt.async_subscribe(hass, 55, record_calls)
# Support for a deprecated callback type will be removed from HA core 2023.2.0
async def test_subscribe_deprecated(hass, mqtt_mock_entry_no_yaml_config):
"""Test the subscription of a topic using deprecated callback signature."""
mqtt_mock = await mqtt_mock_entry_no_yaml_config()
@@ -930,6 +931,7 @@ async def test_subscribe_deprecated(hass, mqtt_mock_entry_no_yaml_config):
assert len(calls) == 1
# Support for a deprecated callback type will be removed from HA core 2023.2.0
async def test_subscribe_deprecated_async(hass, mqtt_mock_entry_no_yaml_config):
"""Test the subscription of a topic using deprecated coroutine signature."""
mqtt_mock = await mqtt_mock_entry_no_yaml_config()