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

deprecated constant which will be removed in HA Core 2025.1 #27

Closed
heinemannj opened this issue Jan 4, 2024 · 4 comments
Closed

deprecated constant which will be removed in HA Core 2025.1 #27

heinemannj opened this issue Jan 4, 2024 · 4 comments

Comments

@heinemannj
Copy link

LENGTH_MILES was used from ingv_centro_nazionale_terremoti, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfLength.MILES instead, please create a bug report at https://github.com/caiosweet/Home-Assistant-custom-components-INGV/issues

LENGTH_KILOMETERS was used from ingv_centro_nazionale_terremoti, this is a deprecated constant which will be removed in HA Core 2025.1.
Use UnitOfLength.KILOMETERS instead, please create a bug report at https://github.com/caiosweet/Home-Assistant-custom-components-INGV/issues
@MarcoZ76
Copy link

I have this issue too

@riddik14
Copy link

riddik14 commented Feb 9, 2024

stesso problema, in realta sono 2

LENGTH_MILES was used from ingv_centro_nazionale_terremoti, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfLength.MILES instead, please create a bug report at https://github.com/caiosweet/Home-Assistant-custom-components-INGV/issues

LENGTH_KILOMETERS was used from ingv_centro_nazionale_terremoti, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfLength.KILOMETERS instead, please create a bug report at https://github.com/caiosweet/Home-Assistant-custom-components-INGV/issues

@mrai64
Copy link
Contributor

mrai64 commented Feb 18, 2024

I'm py newbye but my suggest is that:
init.py + geo_location.py

from homeassistant.const import (
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_RADIUS,
# LENGTH_KILOMETERS,
# LENGTH_MILES,
)
#add to remove LENGTH_KILOMETERS, LENGTH_MILES
from homeassistant.const import UnitOfLength

then substitute LENGHT_ with UnitOfLenght.MILES / KILOMETERS

@caiosweet
Copy link
Owner

I think that with the changes in @mrai64, the warning has been resolved.

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

5 participants