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

custom_components importing constants through * fill the logs with warnings, even when not accessed #107354

Closed
hmmbob opened this issue Jan 6, 2024 · 4 comments
Labels

Comments

@hmmbob
Copy link
Contributor

hmmbob commented Jan 6, 2024

The problem

I am using the custom_component Xiaomi_miot which generated 3159 lines of warnings about deprecated constants in my log. This did not happen on 2024-beta or 2024.1.0. This is probably due to wildcard imports (from homeassistant.const import * ), but quickly checking a few of them reveals that most of the constants warned about are not even accessed in the code.

Earlier warnings in the CC's code were fixed by al-one/hass-xiaomi-miot#1461

Probable regression / side-effect from #107114

What version of Home Assistant Core has the issue?

core-2024.1.1

What was the last working version of Home Assistant Core?

core-2024.1.0

What type of installation are you running?

Home Assistant Container

Integration causing the issue

core

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

I'll just post this snippet, but I've got 3159 lines with warnings 😉

DATA_RATE_KIBIBYTES_PER_SECOND was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfDataRate.KIBIBYTES_PER_SECOND instead, please create a bug report at https://github.com/al-one/hass-xiaomi-miot/issues
09:47:38 – (WAARSCHUWING) helpers/deprecation.py - bericht kwam voor het eerst om 09:47:13 en verschijnt 3128 keer
SUPPORT_ALARM_ARM_AWAY was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2025.1. Use AlarmControlPanelEntityFeature.ARM_AWAY instead, please create a bug report at https://github.com/al-one/hass-xiaomi-miot/issues
09:47:34 – (WAARSCHUWING) Alarmbedieningspaneel - bericht kwam voor het eerst om 09:47:34 en verschijnt 8 keer
DEVICE_CLASS_HUMIDIFIER was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2025.1. Use HumidifierDeviceClass.HUMIDIFIER instead, please create a bug report at https://github.com/al-one/hass-xiaomi-miot/issues
09:47:27 – (WAARSCHUWING) Luchtbevochtiger - bericht kwam voor het eerst om 09:47:27 en verschijnt 3 keer
SUPPORT_TARGET_HUMIDITY was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_HUMIDITY instead, please create a bug report at https://github.com/al-one/hass-xiaomi-miot/issues
09:47:25 – (WAARSCHUWING) Klimaat - bericht kwam voor het eerst om 09:47:25 en verschijnt 20 keer

Additional information

No response

@joostlek
Copy link
Member

joostlek commented Jan 6, 2024

This is by design. This is warning you that you should notify the custom integration developer to fix their stuff before 2025.1.

@joostlek joostlek closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2024
@joostlek joostlek reopened this Jan 6, 2024
@joostlek
Copy link
Member

joostlek commented Jan 6, 2024

Oh right, i missed a part of your issue. That's interesting

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@hmmbob
Copy link
Contributor Author

hmmbob commented Apr 5, 2024

Not seeing this anymore 👍🏻

@hmmbob hmmbob closed this as completed Apr 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants