Deprecated constants create a log entry
In recent years many constants have been replaced by Enums or other values by adding a code comment pointing to the successor. Using deprecated constants will now create a warning log entry containing the used integration, the replacement, and the version where the constant will be removed from core. There will be a one-year deprecation period to ensure all custom integration authors have time to adjust.
Most constants should already have been replaced, as we created several blog posts in the past about their deprecation. Some are listed below:
- Deprecating all SUPPORT_* constants
- Constant deprecations for 2022.5
- AutomationActionType deprecation for 2022.9
- Device tracker deprecations for 2022.9
- Deprecating media player constants
- Add new precipitation intensity units
- Introducing new unit enumerators
- Add more unit enumerators
- Add more unit enumerators
More details can be found in core PR #105736 or by checking the usage of the function check_if_deprecated_constant
in the deprecation helper.