Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soon-to-be-depreciated functionality warnings in 2024.3.0 #1221

Open
borez opened this issue Mar 7, 2024 · 18 comments
Open

Soon-to-be-depreciated functionality warnings in 2024.3.0 #1221

borez opened this issue Mar 7, 2024 · 18 comments

Comments

@borez
Copy link

borez commented Mar 7, 2024

Home Assistant version
2024.3.0

SmartIR version
1.17.9

SmartIR configuration

Add configuration here

Describe the bug

Am using the integration to run IR commands for an aircon. Post upgrade to 2024.3.0, I am seeing these warning messages in HA:

Debug log


Logger: homeassistant.components.climate
Source: components/climate/__init__.py:361
integration: Climate ([documentation](https://www.home-assistant.io/integrations/climate), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+climate%22))
First occurred: 8:43:04 PM (3 occurrences)
Last logged: 8:43:04 PM

    Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please report it to the author of the 'smartir' custom integration
    Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please report it to the author of the 'smartir' custom integration
    Entity None (<class 'custom_components.smartir.climate.SmartIRClimate'>) implements HVACMode(s): off, cool, dry, fan_only and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please report it to the author of the 'smartir' custom integration


Logger: homeassistant.components.climate.const
Source: helpers/deprecation.py:205
integration: Climate (documentation, issues)
First occurred: 8:42:32 PM (9 occurrences)
Last logged: 8:42:32 PM

HVAC_MODE_FAN_ONLY was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'smartir' custom integration
HVAC_MODE_AUTO was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please report it to the author of the 'smartir' custom integration
SUPPORT_TARGET_TEMPERATURE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'smartir' custom integration
SUPPORT_FAN_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.FAN_MODE instead, please report it to the author of the 'smartir' custom integration
SUPPORT_SWING_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.SWING_MODE instead, please report it to the author of the 'smartir' custom integration

Additional context

Add any other context about the problem here.

@PeteDenmark
Copy link

Yep - have been seeing those log entries as well, so hoping the developer can fix it before, since my Broadlink would be pretty much useless to me if smart-ir stops working.

@Krispkiwi
Copy link

SmartIR doesn't get updated often, I suspect a fork is probably our best bet.

@syrusfem
Copy link

Hope there is an update or someone that could do a fork or lots of automation are going to the bin.

@zbeez
Copy link

zbeez commented Mar 24, 2024

Same here. Yes, hope it'll get sorted.

@litinoveweedle
Copy link

Hi, I just pushed PR #1231 fixing all those warning and errors.

@vassilis-panos Coudl you please review it, merge it and release if suitable? It also seems, that you have many PR pending, mostly related to new added codes. Are you planning to merge those? If you need any help please let me know.

If anyone would like to meanwhile get rid of the errors, you can use my fork from here: https://github.com/litinoveweedle/SmartIR

@PeteDenmark
Copy link

Hi, I just pushed PR #1231 fixing all those warning and errors.

@vassilis-panos Coudl you please review it, merge it and release if suitable? It also seems, that you have many PR pending, mostly related to new added codes. Are you planning to merge those? If you need any help please let me know.

If anyone would like to meanwhile get rid of the errors, you can use my fork from here: https://github.com/litinoveweedle/SmartIR

You are a legend. Thank you for your work.

@maxperron
Copy link

Hi, I just pushed PR #1231 fixing all those warning and errors.

@vassilis-panos Coudl you please review it, merge it and release if suitable? It also seems, that you have many PR pending, mostly related to new added codes. Are you planning to merge those? If you need any help please let me know.

If anyone would like to meanwhile get rid of the errors, you can use my fork from here: https://github.com/litinoveweedle/SmartIR

Thank you for your work! I have been using your fork, but a new warning appeared unfortunalty, looks like HA is doing a lot of change.

Detected that custom integration 'smartir' calls 'async_track_state_change' instead of 'async_track_state_change_event' which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/smartir/climate.py, line 176: async_track_state_change(self.hass, self._temperature_sensor, please report it to the author of the 'smartir' custom integration
• Detected that custom integration 'smartir' calls 'async_track_state_change instead of 'async_track_state_change_event' which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/smartir/climate.py, line 192: async_track_state_change(self.hass, self._power_sensor, please report it to the author of the 'smartir' custom

@Krispkiwi
Copy link

Same

@litinoveweedle
Copy link

Hello, fixed in PR3 and release in the 1.17.11 in my forked repo.

As @vassilis-panos seem to ignore all my previous PRs, I did not opened PR with this fix against his/this original repo. I have no issue to push it later, if I there will be any sight of activity from his side. Therefore I am afraid you need to use my repo till then.

@syrusfem
Copy link

Hello, fixed in PR3 and release in the 1.17.11 in my forked repo.

As @vassilis-panos seem to ignore all my previous PRs, I did not opened PR with this fix against his/this original repo. I have no issue to push it later, if I there will be any sight of activity from his side. Therefore I am afraid you need to use my repo till then.

Hi how do i use your repo in Homeassistant instead of the original ?

@litinoveweedle
Copy link

HACS, add custom repo.

@agneevX
Copy link
Contributor

agneevX commented May 18, 2024

@litinoveweedle please note that the following errors on v1.17.12

2024-05-18 21:20:33.920 ERROR (MainThread) [homeassistant.config] Platform error: climate - cannot import name 'EventStateChangedData' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 1437, in _async_load_and_validate_platform_integration
platform = await p_integration.integration.async_get_platform(domain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1070, in async_get_platform
platforms = await self.async_get_platforms((platform_name,))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1163, in async_get_platforms
platforms[platform_name] = await future
^^^^^^^^^^^^
ImportError: cannot import name 'EventStateChangedData' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py)

@agneevX
Copy link
Contributor

agneevX commented May 18, 2024

Fixed by upgrading to latest version of Home Assistant, please ignore.

@litinoveweedle
Copy link

Yep, that makes sense, as the warning fix is for the recent HA version. I will check the exact version and put it as a prerequisite for integration into HACS manifest. Although I am pretty sure it is there. Did you by any chance install integration manually?

@syrusfem
Copy link

HACS, add custom repo.

Hi adding your repo to the repository won' t reset the originasl smarir configuration right? Or i must reconfigure my smartir devices with the new repo?

@vassilis-panos
Copy link
Member

Hi litinoveweedle
What exactly is your fork for?
And please do not submit it to HACS. There's a reason it hasn't been done all this time

@litinoveweedle
Copy link

Hello @vassilis-panos

What exactly is your fork for?

The reason I initially started my fork was because I needed some PR from other users included, PR which you did not merged for long time into your releases. Than I started to fix some recent HA deprecation warnings and also some long pending bugs reported to your repo. I was trying to push my changes to your mainstream, but without response I gave up. To ease maintenance and installation of my fork I therefore started making some less compatible changes now, including own custom HACS repo.

And please do not submit it to HACS. There's a reason it hasn't been done all this time

Any specific reason for that? In the next commit I am going to remove your original functionality for checking and updating integration version directly from github, as well as automatic download of the codes. This is from my perspective redundant to HACS (update of the integration) and potentially less secure dependent (codes download). Codes will be distributes as part of the HACS zip package release.

@litinoveweedle
Copy link

HACS, add custom repo.

Hi adding your repo to the repository won' t reset the originasl smarir configuration right? Or i must reconfigure my smartir devices with the new repo?

Test it and you will see. It is easy to make backup of whole HA or just HA configuration. It is just copy paste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants