From fc3f2437d504026ba80c7232daaafeab9882b461 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 28 Dec 2023 11:48:05 -1000 Subject: [PATCH] Add blog post for deprecating supported features magic numbers (#2027) --- ...pport-feature-magic-numbers-deprecation.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 blog/2023-12-28-support-feature-magic-numbers-deprecation.md diff --git a/blog/2023-12-28-support-feature-magic-numbers-deprecation.md b/blog/2023-12-28-support-feature-magic-numbers-deprecation.md new file mode 100644 index 00000000..8fc83df1 --- /dev/null +++ b/blog/2023-12-28-support-feature-magic-numbers-deprecation.md @@ -0,0 +1,64 @@ +--- +author: J. Nick Koston +authorURL: https://github.com/bdraco +title: "Deprecating all magic numbers for supported features" +--- + +As of Home Assistant Core 2024.1, all usage of magic numbers for supported features is deprecated, +and each entity platform has provided an `EntityFeature` enum to replace them. + +There will be a one-year deprecation period, and the magic numbers will stop working in 2025.1 to ensure all custom integration authors have time to adjust. + +This applies to, the following platforms: + +- **Alarm Control Panel** + + Use the new [`AlarmControlPanelEntityFeature`](/docs/core/entity/alarm-control-panel#supported-features) enum instead. + +- **Camera** + + Use the new [`CameraEntityFeature`](/docs/core/entity/camera#supported-features) enum instead. + +- **Cover** + + Use the new [`CoverEntityFeature`](/docs/core/entity/cover#supported-features) enum instead. + +- **Climate** + + Use the new [`ClimateEntityFeature`](/docs/core/entity/climate#supported-features) enum instead. + +- **Humidifier** + + Use the new [`HumidifierEntityFeature`](/docs/core/entity/humidifier#supported-features) enum instead. + +- **Fan** + + Use the new [`FanEntityFeature`](/docs/core/entity/fan#supported-features) enum instead. + +- **Light** + + Use the new [`LightEntityFeature`](/docs/core/entity/light#supported-features) enum instead. + +- **Lock** + + Use the new [`LockEntityFeature`](/docs/core/entity/lock#supported-features) enum instead. + +- **Media Player** + + Use the new [`MediaPlayerEntityFeature`](/docs/core/entity/media-player#supported-features) enum instead. + +- **Remote** + + Use the new [`RemoteEntityFeature`](/docs/core/entity/remote#supported-features) enum instead. + +- **Siren** + + Use the new [`SirenEntityFeature`](/docs/core/entity/siren#supported-features) enum instead. + +- **Vacuum** + + Use the new [`VacuumEntityFeature`](/docs/core/entity/vacuum#supported-features) enum instead. + +- **Water Heater** + + Use the new [`WaterHeaterEntityFeature`](/docs/core/entity/water-heater#supported-features) enum instead. \ No newline at end of file