mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 21:06:50 +00:00
Remove alternatives from version (#18936)
This commit is contained in:
parent
63d450e73a
commit
dec9dfd412
@ -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`
|
`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 %}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user