ha-school: Fix indentation.
This commit is contained in:
parent
4ae05fd735
commit
a27674b1b3
1 changed files with 80 additions and 80 deletions
|
|
@ -181,40 +181,40 @@ Note that the display doesn't respond to being turned back on, so this is somewh
|
||||||
The corresponding portion of the config for `ha-mqtt-iot` looks like the following:
|
The corresponding portion of the config for `ha-mqtt-iot` looks like the following:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"lights": [
|
"lights": [
|
||||||
{
|
{
|
||||||
"info": {
|
"info": {
|
||||||
"name": "Desktop Monitor",
|
"name": "Desktop Monitor",
|
||||||
"id": "monitor"
|
"id": "monitor"
|
||||||
},
|
},
|
||||||
"command": [
|
"command": [
|
||||||
"./scripts/monitor.sh",
|
"./scripts/monitor.sh",
|
||||||
"command"
|
"command"
|
||||||
],
|
],
|
||||||
"command_state": [
|
"command_state": [
|
||||||
"./scripts/monitor.sh",
|
"./scripts/monitor.sh",
|
||||||
"command-state"
|
"command-state"
|
||||||
],
|
],
|
||||||
"command_color_temp": [
|
"command_color_temp": [
|
||||||
"./scripts/monitor.sh",
|
"./scripts/monitor.sh",
|
||||||
"color-temp"
|
"color-temp"
|
||||||
],
|
],
|
||||||
"command_color_temp_state": [
|
"command_color_temp_state": [
|
||||||
"./scripts/monitor.sh",
|
"./scripts/monitor.sh",
|
||||||
"color-temp-state"
|
"color-temp-state"
|
||||||
],
|
],
|
||||||
"command_brightness": [
|
"command_brightness": [
|
||||||
"./scripts/monitor.sh",
|
"./scripts/monitor.sh",
|
||||||
"brightness"
|
"brightness"
|
||||||
],
|
],
|
||||||
"command_brightness_state": [
|
"command_brightness_state": [
|
||||||
"./scripts/monitor.sh",
|
"./scripts/monitor.sh",
|
||||||
"brightness-state"
|
"brightness-state"
|
||||||
],
|
],
|
||||||
"brightness_scale": 100,
|
"brightness_scale": 100,
|
||||||
"update_interval": 5
|
"update_interval": 5
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Pretty simple.
|
Pretty simple.
|
||||||
|
|
@ -222,21 +222,21 @@ This makes custom system sensors trivial.
|
||||||
For example, to show my system IP, I use the following:
|
For example, to show my system IP, I use the following:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"sensors": [
|
"sensors": [
|
||||||
{
|
{
|
||||||
"info": {
|
"info": {
|
||||||
"name": "IP Address Desktop Solus",
|
"name": "IP Address Desktop Solus",
|
||||||
"id": "ip-address-desktop-solus",
|
"id": "ip-address-desktop-solus",
|
||||||
"icon": "mdi:ip-network"
|
"icon": "mdi:ip-network"
|
||||||
},
|
},
|
||||||
"command_state": [
|
"command_state": [
|
||||||
"/bin/bash",
|
"/bin/bash",
|
||||||
"-c",
|
"-c",
|
||||||
"ip -j address show eno1 | jq -r '.[0].addr_info[0].local'"
|
"ip -j address show eno1 | jq -r '.[0].addr_info[0].local'"
|
||||||
],
|
],
|
||||||
"update_interval": 10
|
"update_interval": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Some common use cases are built in as well.
|
Some common use cases are built in as well.
|
||||||
|
|
@ -245,28 +245,28 @@ These are really easy to call.
|
||||||
An exhaustive example is quite short:
|
An exhaustive example is quite short:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"builtin": {
|
"builtin": {
|
||||||
"prefix": "Name Prefix ",
|
"prefix": "Name Prefix ",
|
||||||
"backlight": {
|
"backlight": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"temperature": false,
|
"temperature": false,
|
||||||
"range": {
|
"range": {
|
||||||
"minimum": 0.025,
|
"minimum": 0.025,
|
||||||
"maximum": 0.95
|
"maximum": 0.95
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"battery": {
|
"battery": {
|
||||||
"enable": true
|
"enable": true
|
||||||
},
|
},
|
||||||
"crypto": [
|
"crypto": [
|
||||||
{
|
{
|
||||||
"coin_name": "dogecoin",
|
"coin_name": "dogecoin",
|
||||||
"currency_name": "usd",
|
"currency_name": "usd",
|
||||||
"update_interval": 1,
|
"update_interval": 1,
|
||||||
"icon": "mdi:currency-usd"
|
"icon": "mdi:currency-usd"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This lets me tailor my setup to each machine I'm using, while still enjoying the benefits of Home Assistant MQTT Discovery.
|
This lets me tailor my setup to each machine I'm using, while still enjoying the benefits of Home Assistant MQTT Discovery.
|
||||||
|
|
@ -283,20 +283,20 @@ I have configured on my VPS a docker image that accepts reverse SSH tunnelling,
|
||||||
From my `docker-compose.yml`:
|
From my `docker-compose.yml`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
homeassistant:
|
homeassistant:
|
||||||
image: "docker.io/panubo/sshd"
|
image: "docker.io/panubo/sshd"
|
||||||
container_name: homeassistant
|
container_name: homeassistant
|
||||||
environment:
|
environment:
|
||||||
- TCP_FORWARDING=true
|
- TCP_FORWARDING=true
|
||||||
- GATEWAY_PORTS=true
|
- GATEWAY_PORTS=true
|
||||||
- SSH_ENABLE_ROOT=true
|
- SSH_ENABLE_ROOT=true
|
||||||
- DISABLE_SFTP=true
|
- DISABLE_SFTP=true
|
||||||
volumes:
|
volumes:
|
||||||
- "./hassio/authorized_keys:/root/.ssh/authorized_keys:ro"
|
- "./hassio/authorized_keys:/root/.ssh/authorized_keys:ro"
|
||||||
- ./docker-config/hassio/data/:/data
|
- ./docker-config/hassio/data/:/data
|
||||||
- ./docker-config/hassio/keys/:/etc/ssh/keys
|
- ./docker-config/hassio/keys/:/etc/ssh/keys
|
||||||
ports:
|
ports:
|
||||||
- "<MY_PORT>:22"
|
- "<MY_PORT>:22"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
hostname: "homeassistant"
|
hostname: "homeassistant"
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue