2018-10-17 20:44:37 +02:00
|
|
|
Version Text Sensor
|
|
|
|
===================
|
|
|
|
|
2018-11-14 22:12:27 +01:00
|
|
|
.. seo::
|
|
|
|
:description: Instructions for setting up version text sensors.
|
2021-11-16 03:19:33 +01:00
|
|
|
:image: new-box.svg
|
2018-11-14 22:12:27 +01:00
|
|
|
|
2019-02-16 23:25:23 +01:00
|
|
|
The ``version`` text sensor platform exposes the ESPHome version the firmware
|
2018-10-17 20:44:37 +02:00
|
|
|
was compiled against as a text sensor.
|
|
|
|
|
|
|
|
.. figure:: images/version-ui.png
|
|
|
|
:align: center
|
|
|
|
|
2018-11-19 18:32:16 +01:00
|
|
|
.. code-block:: yaml
|
2018-10-17 20:44:37 +02:00
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
text_sensor:
|
|
|
|
- platform: version
|
2019-02-16 23:25:23 +01:00
|
|
|
name: "ESPHome Version"
|
2018-10-17 20:44:37 +02:00
|
|
|
|
|
|
|
Configuration variables:
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
- **name** (**Required**, string): The name of the text sensor.
|
2021-07-28 23:56:11 +02:00
|
|
|
- **hide_timestamp** (*Optional*, boolean): Allows you to hide the compilation timestamp from the version string. Defaults to ``false``.
|
2018-10-17 20:44:37 +02:00
|
|
|
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
2019-02-17 12:28:17 +01:00
|
|
|
- All other options from :ref:`Text Sensor <config-text_sensor>`.
|
2018-10-17 20:44:37 +02:00
|
|
|
|
2020-07-11 22:32:46 +02:00
|
|
|
Disabling the compilation timestamp:
|
|
|
|
------------------------------------
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
text_sensor:
|
|
|
|
- platform: version
|
|
|
|
name: "ESPHome Version"
|
2021-07-28 23:56:11 +02:00
|
|
|
hide_timestamp: true
|
2020-07-11 22:32:46 +02:00
|
|
|
|
2023-01-19 13:47:53 +01:00
|
|
|
This will, for example, change the output of the sensor from:
|
2020-07-11 22:32:46 +02:00
|
|
|
|
2024-05-30 21:33:34 +02:00
|
|
|
``2024.6.0-dev May 30 2024, 09:07:35`` to just ``2024.6.0-dev``
|
2020-07-11 22:32:46 +02:00
|
|
|
|
|
|
|
|
2018-10-17 20:44:37 +02:00
|
|
|
See Also
|
|
|
|
--------
|
|
|
|
|
2019-05-12 22:44:59 +02:00
|
|
|
- :apiref:`version/version_text_sensor.h`
|
2019-02-07 13:54:45 +01:00
|
|
|
- :ghedit:`Edit`
|