2.1 KiB
layout | title | description | date | sidebar | comments | sharing | footer | ha_category | ha_iot_class | logo | ha_release | ha_qa_scale |
---|---|---|---|---|---|---|---|---|---|---|---|---|
page | Version Sensor | Instructions on how to integrate a version sensor into Home Assistant. | 2017-08-10 10:30 | true | false | true | true | Utility | Local Pushing | home-assistant.png | 0.52 | internal |
The version
sensor platform is displaying the current version of Home Assistant in the frontend.
{% linkable_title Configuration %}
To enable this sensor, add the following lines to your configuration.yaml
file for a GET request:
# Example configuration.yaml entry
sensor:
- platform: version
{% configuration %} name: description: Name to use in the frontend. required: false type: string default: Current Version {% endconfiguration %}
{% linkable_title Alternatives %}
This sensor is an alternative to the existing solutions to achieve the same result through various platforms. Remember that you can easily get the installed version on the command line.
$ hass --version
Or go to the Info section of the Developer Tools.
A command_line
with
hass
to display your current version.
sensor:
- platform: command_line
name: Version
command: "/home/homeassistant/bin/hass --version"
It's also possible to ready a file called .HA_VERSION
which is located in your
Home Assistant configuration folder.
sensor:
- platform: command_line
name: Version
command: "cat /home/homeassistant/.homeassistant/.HA_VERSION"
You might think that a rest
sensor could work,
too,
but it will not as Home Assistant is not ready when the sensor get initialized.
{% raw %}
sensor:
- platform: rest
resource: http://IP_ADDRESS:8123/api/config
name: Current Version
value_template: '{{ value_json.version }}'
{% endraw %}