parent
985aae3fd0
commit
9b635ca1a3
@ -1,2 +1,3 @@
|
||||
compiled
|
||||
cameras.yaml
|
||||
cameras.yaml
|
||||
tracked_Devices.yaml
|
@ -0,0 +1,15 @@
|
||||
# Desk kiosk on/off
|
||||
- id: desk_kiosk
|
||||
alias: Desk Kiosk
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: !secret tracked_device_1
|
||||
action:
|
||||
- service: shell_command.lightdm
|
||||
data_template:
|
||||
action: >-
|
||||
{% if trigger.to_state.state == 'home' %}
|
||||
start
|
||||
{% else %}
|
||||
stop
|
||||
{% endif %}
|
@ -1,3 +1,17 @@
|
||||
# Sensors
|
||||
|
||||
Various sensor configurations. Each of the ```yaml``` files is a *different* sensor.
|
||||
|
||||
## SSH Voodoo
|
||||
|
||||
Some sensors are setup to use ssh -> host to bail out of the docker container for monitoring. You'll need to run the below setup on the Docker host to get these sensors working.
|
||||
|
||||
``` bash
|
||||
|
||||
useradd -m -s /bin/bash home-assistant
|
||||
sudo -sHu home-assistant
|
||||
ssh-keygen -t rsa -b 4096
|
||||
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
||||
cat ~/.ssh/id_rsa > /path/to/config/host-id-rsa
|
||||
|
||||
```
|
@ -0,0 +1,31 @@
|
||||
# These are respresentative of the host system too despite containerization
|
||||
- platform: systemmonitor
|
||||
resources:
|
||||
- type: memory_use_percent
|
||||
- type: swap_use_percent
|
||||
- type: load_5m
|
||||
|
||||
# SSH voodoo to work around containerization
|
||||
- platform: command_line
|
||||
name: disk_use_root
|
||||
command: "ssh -i /config/host-id-rsa -o StrictHostKeyChecking=no home-assistant@172.30.0.1 df --output=pcent / | sed 1d | sed 's/ //g' | sed 's/%//g'"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
# SSH voodoo to work around containerization
|
||||
- platform: command_line
|
||||
name: disk_use_tank
|
||||
command: "ssh -i /config/host-id-rsa -o StrictHostKeyChecking=no home-assistant@172.30.0.1 df --output=pcent /tank | sed 1d | sed 's/ //g' | sed 's/%//g'"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
# Works on SOPine ; standard cpuspeed patform doesn't support SOPine
|
||||
- platform: command_line
|
||||
name: cpu_speed
|
||||
command: "ssh -i /config/host-id-rsa -o StrictHostKeyChecking=no home-assistant@172.30.0.1 cpufreq-info -f"
|
||||
unit_of_measurement: "Hz"
|
||||
|
||||
# Thermal zone for CPU on SOPine and other arm boards
|
||||
- platform: command_line
|
||||
name: cpu_temperature
|
||||
command: "cat /sys/class/thermal/thermal_zone0/temp"
|
||||
unit_of_measurement: "°C"
|
||||
value_template: '{{ value | multiply(0.001) | round(2) }}'
|
@ -0,0 +1 @@
|
||||
lightdm: "ssh -i /config/host-id-rsa -o StrictHostKeyChecking=no home-assistant@172.30.0.1 sudo systemctl {{ action }} lightdm"
|
Loading…
Reference in new issue