home-automation/sensors/server.yaml

32 lines
1.2 KiB
YAML

# 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) }}'