Skip to content

Commit

Permalink
GITBOOK-81: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
bkbilly authored and gitbook-bot committed Jun 7, 2024
1 parent d765eb8 commit e20cd65
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 34 deletions.
2 changes: 1 addition & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* [🌩️ LNXlink](README.md)
* [🖥️ Setup](setup.md)
* [📂 Configuration](configuration.md)
* [🔗 Settings](settings.md)
* [🎬 Media Player](media-player.md)
* [🔗 Settings](settings.md)
* [🔱 Modules Usage](examples.md)
* [🤯 Automations](automations.md)
* [🛠️ Development](development.md)
33 changes: 0 additions & 33 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,39 +59,6 @@ action:
entity_id: text.desktop_linux_xdg_open
```

## Bash

The bash module can run any command on a remote computer which makes it dangerous, but also very helpful to create sensors without creating modules on LNXlink.

You will need to create a new sensor on your Home Assistant configuration file like so:

```yaml
mqtt:
sensor:
- name: "Test ls"
unique_id: "test_ls"
state_topic: "lnxlink/desktop-linux/command_result/bash/bash_command/test_ls"
availability:
- topic: "lnxlink/desktop-linux/lwt"
payload_available: "ON"
payload_not_available: "OFF"
```

Then you must create an automation to run on an interval to get the result of a command:

```yaml
alias: Get files count
mode: single
trigger:
- platform: time_pattern
seconds: "40"
action:
- service: mqtt.publish
data:
topic: lnxlink/desktop-linux/commands/bash/bash_command/test_ls
payload: ls ~/Downloads | wc -l
```

## Voice Assistant

The Speech Recognition module listens to the user's input and sends the response as an attribute to the binary sensor of speech recognition entity.
Expand Down
37 changes: 37 additions & 0 deletions settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,43 @@ settings:
unit: load
```
<details>
<summary>Create Bash sensors on Home Assistant side</summary>
The bash module can run any command on a remote computer which makes it dangerous, but also very helpful to create sensors without creating modules on LNXlink.
You will need to create a new sensor on your Home Assistant configuration file like so:
```yaml
mqtt:
sensor:
- name: "Test ls"
unique_id: "test_ls"
state_topic: "lnxlink/desktop-linux/command_result/bash/bash_command/test_ls"
availability:
- topic: "lnxlink/desktop-linux/lwt"
payload_available: "ON"
payload_not_available: "OFF"
```
Then you must create an automation to run on an interval to get the result of a command:
```yaml
alias: Get files count
mode: single
trigger:
- platform: time_pattern
seconds: "40"
action:
- service: mqtt.publish
data:
topic: lnxlink/desktop-linux/commands/bash/bash_command/test_ls
payload: ls ~/Downloads | wc -l
```
</details>
## Disk usage
By default this module finds all connected drives and exposes them to Home assistant, but this can be changed by setting them manually on settings with the include\_disks option:
Expand Down

0 comments on commit e20cd65

Please sign in to comment.