Skip to content

Commit

Permalink
Add deadline for custom components (#4446)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbx81 authored Nov 18, 2024
1 parent 075392d commit 278196a
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 29 deletions.
4 changes: 2 additions & 2 deletions components/binary_sensor/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom Binary Sensor
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions components/climate/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom Climate
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions components/cover/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom Cover
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions components/light/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom Light Output
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions components/output/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom Output
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions components/sensor/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom Sensor Component
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions components/switch/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom Switch
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions components/text_sensor/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom Text Sensor
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions custom/custom_component.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Generic Custom Component
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions custom/i2c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom I²C Device
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions custom/spi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom SPI Device
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
4 changes: 2 additions & 2 deletions custom/uart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Custom UART Device
.. warning::

:ref:`Custom Components are deprecated<a_note_about_custom_components>`, not recommended for new configurations and
will be removed from ESPHome in a future release. Please look at creating a real ESPHome component and "importing"
it into your configuration with :doc:`/components/external_components`.
will be removed from ESPHome in the ``2025.1.0`` release. Please look at creating a real ESPHome component and
"importing" it into your configuration with :doc:`/components/external_components`.

You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.

Expand Down
19 changes: 14 additions & 5 deletions guides/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,10 @@ ESPHome's "custom component" mechanism is a holdover from Home Assistant's featu
:doc:`/components/external_components` and offered a way to "hack in" support for devices which were not officially
supported by ESPHome.

ESPHome has since deprecated this feature in favor of :doc:`/components/external_components` for several reasons:
Why are Custom Components Deprecated?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There are several reasons for this change.

- Custom components are very fragile:

Expand All @@ -1026,11 +1029,13 @@ ESPHome has since deprecated this feature in favor of :doc:`/components/external
resulting in compiler errors, unexpected behavior and/or crashes.
- Custom components are difficult to use. You have to manually copy all of the custom component's files into *just
the right location* on your system or else you will receive compiler errors and the component won't work.
- Custom components almost always require C++ code changes when you want them to work even *slightly* differently
than the original author intended.
- Custom components lack flexibility and almost always require C++ code changes when you want them to work even
*slightly* differently than the original author intended/designed. For example, a simple change of input units
(``cm`` to ``m``, for example) could require significant changes to the C++ code, depending on how the original
author designed the custom component.

- :doc:`/components/external_components` initially require a bit more effort by the developer but are ultimately more
robust and easier to use and share:
robust and are easier to use and share:

- Just like any other ESPHome component/platform:

Expand All @@ -1044,7 +1049,8 @@ ESPHome has since deprecated this feature in favor of :doc:`/components/external

- They tend to be more flexible since they are configured in YAML (as opposed to editing C++ code to make changes).

**So what is the difference between custom components and** :doc:`/components/external_components`?
What's the Difference?
^^^^^^^^^^^^^^^^^^^^^^

Custom components are typically (more or less) just the :ref:`runtime` part of an ESPHome component/platform. On the
other hand, :doc:`/components/external_components` are just like any other ESPHome component -- the only difference is
Expand All @@ -1058,6 +1064,9 @@ In terms of implementation, custom components just lack the Python part of an ES
As such, most custom components can be made into :doc:`/components/external_components` simply by adding the required
Python parts to make the custom component into a proper, complete ESPHome component.

What's Next?
^^^^^^^^^^^^

We encourage all custom component developers to extend their custom component(s) into proper
:doc:`/components/external_components`; doing so will make your custom component easier to share and use. As you do so,
be sure to have a look at the the :ref:`contributing_to_esphome` section above as it walks through ESPHome (component)
Expand Down

0 comments on commit 278196a

Please sign in to comment.