amosyuen/ha-tplink-deco

Deprecation Warning in HA 2024.4+

Closed this issue ยท 6 comments

Problem

Starting with HA 2024.4, the following warning is printed on startup

[homeassistant.helpers.frame] Detected that custom integration 'tplink_deco' calls `async_add_job`, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/tplink_deco/__init__.py, line 166: hass.async_add_job(, please create a bug report at https://github.com/amosyuen/ha-tplink-deco/issues

TP-Link Deco Version

v3.6.0

Router Model

Deco M9

Debugging Information

n/a

[homeassistant.helpers.frame] Detected that custom integration 'tplink_deco' calls async_add_job, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/tplink_deco/init.py

Version 3.6.1. is not working for me:

file "/config/custom_components/tplink_deco/init.py", line 166, in async_setup_entry config_entry.async_create_task(

I had to restore a backup with version 3.6.0. Even downgrading was not working. Integration was loaded but "Failed to connect".

I hope you can fix it. I guess the mutation you did is not correct: https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job/

I can test if you want.

Device info
M4R
by TP-Link Deco
Connected via [Woonkamer Deco]
Firmware: 1.1.2 Build 20231227 Rel. 84005
Hardware: 4.0

Thanks for testing. Unfrotunately I don't have a deco anymore so it's a little difficult for me to test. I made another fix in v3.6.2. I mocked some responses and it seemed to get through the code without an error. Please give it another try.

This v3.6.2 is working fine and without error in the HA logging! Great work. Thank you very much.

Great thanks for testing it and reporting back!

I hope this integration will be maintained in the future. I love it. I am able to test fast. I run HA in docker in vm on proxmox.