ha-tplink-deco icon indicating copy to clipboard operation
ha-tplink-deco copied to clipboard

Deprecation Warning in HA 2024.4+

Open mikeage opened this issue 10 months ago • 2 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

mikeage avatar Apr 08 '24 07:04 mikeage

[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

nilsoo avatar Apr 09 '24 06:04 nilsoo

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

Beer17HWAM avatar May 03 '24 12:05 Beer17HWAM

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.

amosyuen avatar May 06 '24 06:05 amosyuen

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

Beer17HWAM avatar May 06 '24 13:05 Beer17HWAM

Great thanks for testing it and reporting back!

amosyuen avatar May 06 '24 16:05 amosyuen

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.

Beer17HWAM avatar May 06 '24 16:05 Beer17HWAM