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

HA 2024.1 - Multiple deprecated constants #106

Closed
Troon opened this issue Jan 4, 2024 · 8 comments · Fixed by #108
Closed

HA 2024.1 - Multiple deprecated constants #106

Troon opened this issue Jan 4, 2024 · 8 comments · Fixed by #108

Comments

@Troon
Copy link

Troon commented Jan 4, 2024

From the logs on my 2024.1 install:

SOURCE_TYPE_GPS was used from jlrincontrol, this is a deprecated constant which will be removed in HA Core 2025.1. Use SourceType.GPS instead, please report it to the author of the 'jlrincontrol' custom integration
PRESSURE_BAR was used from jlrincontrol, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.BAR instead, please report it to the author of the 'jlrincontrol' custom integration
@ismarslomic ismarslomic changed the title Deprecated constants HA 2024.1 - Deprecated constants for GPS and BAR Jan 9, 2024
@ismarslomic
Copy link
Collaborator

Thanks for reporting this, @Troon! I will look at this in upcoming days and release new version of the integration

@ismarslomic
Copy link
Collaborator

Additional constants that are deprecated (seen in HA 2024.1.2)

  1. PRESSURE_BAR was used from jlrincontrol, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.BAR instead, please report it to the author of the 'jlrincontrol' custom integration

  2. PRESSURE_PSI was used from jlrincontrol, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.PSI instead, please report it to the author of the 'jlrincontrol' custom integration

  3. LENGTH_KILOMETERS was used from jlrincontrol, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfLength.KILOMETERS instead, please report it to the author of the 'jlrincontrol' custom integration

  4. LENGTH_METERS was used from jlrincontrol, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfLength.METERS instead, please report it to the author of the 'jlrincontrol' custom integration

  5. PRESSURE_PA was used from jlrincontrol, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.PA instead, please report it to the author of the 'jlrincontrol' custom integration

@ismarslomic ismarslomic changed the title HA 2024.1 - Deprecated constants for GPS and BAR HA 2024.1 - Multiple deprecated constants Jan 9, 2024
@ismarslomic
Copy link
Collaborator

ismarslomic commented Jan 9, 2024

@msp1974 just a clarification regarding the homeassistant key in the hacs manifest file hacs.json.

When we change to these new constants we would also break the backward compatibility, and would need to adjust the homeassistant version that is required for new version of the JLR integration. Right?

@msp1974
Copy link
Owner

msp1974 commented Jan 9, 2024

Yes that's correct. Not sure when these constants were added but we should make it earliest version that they are in.

@ismarslomic
Copy link
Collaborator

After checking quickly in HA core, it seems that some of these constants has existing for some time, but the deprecation warnings were introduced in v2024.1.

Btw: I see that the manifest file has not been touched for 4 years, but we do specify that minimum required HA version is 2022.10 in README. So I guess it just a miss from our side?

Due to changes in Home Assistant, this integration requires a minimum of HA v2022.10

@Troon
Copy link
Author

Troon commented Jan 9, 2024

UnitOfPressure enum introduced in home-assistant/core#81009
UnitOfLength enum introduced in home-assistant/core#81011

These constants were introduced in 2022.11.

@ismarslomic
Copy link
Collaborator

ismarslomic commented Jan 9, 2024

SourceType enum introduced in home-assistant/core#75892 and HA 2022.9
UnitOfTemperature enum introduced in home-assistant/core#81006 and HA 2022.11
UnitOfVolume enum introduced in home-assistant/core#81028 and HA 2022.11
UnitOfEnergy enum introduced in home-assistant/core#80998 and HA 2022.11

@ismarslomic
Copy link
Collaborator

Resolved in v2.2.5

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

Successfully merging a pull request may close this issue.

3 participants