Remove alternatives from version (#18936)

This commit is contained in:
Joakim Sørensen 2021-08-16 14:23:44 +02:00 committed by GitHub
parent 63d450e73a
commit dec9dfd412
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,50 +54,5 @@ source:
`default`, `qemux86`, `qemux86-64`, `qemuarm`, `qemuarm-64`, `generic-x86-64`, `raspberrypi`, `raspberrypi2`, `raspberrypi3`, `raspberrypi3-64`, `raspberrypi4`, `raspberrypi4-64`, `tinker`, `odroid-c2`, `odroid-n2`, `odroid-xu`
## Alternatives for showing local version
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.
```bash
hass --version
```
Or go to the <img src='/images/screenshots/developer-tool-about-icon.png' alt='service developer tool icon' class="no-shadow" height="38" /> **Info** section of the **Developer Tools**.
A [`command_line`](/integrations/sensor.command_line/) with
[`hass`](/docs/tools/hass/) to display your current version.
```yaml
sensor:
- platform: command_line
name: Version
command: "/home/homeassistant/bin/hass --version"
```
It's also possible to read a file called `.HA_VERSION` which is located in your
Home Assistant [configuration](/docs/configuration/) folder.
```yaml
sensor:
- platform: command_line
name: Version
command: "cat /home/homeassistant/.homeassistant/.HA_VERSION"
```
You might think that a [`rest` sensor](/integrations/rest) could work,
too,
but it will not as Home Assistant is not ready when the sensor gets initialized.
{% raw %}
```yaml
sensor:
- platform: rest
resource: http://IP_ADDRESS:8123/api/config
name: Current Version
value_template: "{{ value_json.version }}"
```
{% endraw %}