如
homeassistant:
customize:
sensor.latest_homeassistant:
friendly_name: 最新版本
homebridge_hidden: true
sensor.cpu_temperature:
friendly_name: 系统温度
homebridge_hidden: true
icon: mdi:temperature-celsius
sensor.disk_use_:
friendly_name: 已使用
homebridge_hidden: true
sensor.disk_free_:
friendly_name: 剩余
homebridge_hidden: true
sensor.network_out_wlan0:
friendly_name: 发送字节
homebridge_hidden: true
sensor.network_in_wlan0:
friendly_name: 接收字节
homebridge_hidden: true
sensor.ipv4_address_wlan0:
friendly_name: IP地址
homebridge_hidden: true
sensor.last_boot:
friendly_name: 上次重启
homebridge_hidden: true
sensor.since_last_boot_templated:
friendly_name: 已启动
homebridge_hidden: true
sensor.memory_use_percent:
friendly_name: RAM使用率
homebridge_hidden: true
sensor.cpu_speed:
friendly_name: CPU频率
homebridge_hidden: true
sensor.processor_use:
friendly_name: CPU使用频率
homebridge_hidden: true
sensor.uptime:
friendly_name: 系统运行
homebridge_hidden: true
sensor:
- platform: systemmonitor
resources:
- type: memory_use_percent
- type: processor_use
- type: disk_use
arg: /
- type: disk_free
arg: /
- type: disk_use_percent
- type: network_in
arg: wlan0
- type: network_out
arg: wlan0
- type: ipv4_address
arg: wlan0
- type: last_boot
#arg: octave-cli
- type: since_last_boot
# arg: octave-cli
#HomeAssistant运行时间
- platform: uptime
unit_of_measurement: hours
- platform: command_line
name: CPU Temperature
command: "cat /sys/class/thermal/thermal_zone0/temp"
# If errors occur, remove degree symbol below
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(2)}}'
#value_template: '{{ value | round(2) }}'
scan_interval: 30
- platform: command_line
command: python3 -c "import requests; print(requests.get('https://pypi.python.org/pypi/homeassistant/json').json()['info']['version'])"
name: latest_homeassistant
- platform: template
sensors:
since_last_boot_templated:
value_template: >-
{% if states.sensor.since_last_boot.state.count("day") > 0 %}
{{states.sensor.since_last_boot.state.split(",") [0] +
"," +
states.sensor.since_last_boot.state.split(",") [1].split(":") [0] +
" hours, " +
states.sensor.since_last_boot.state.split(",") [1].split(":") [1] +
" minutes" }}
{% else %}
{{ "0 days, " +
states.sensor.since_last_boot.state.split(",") [0].split(":") [0] +
" hours, " +
states.sensor.since_last_boot.state.split(",") [0].split(":") [1] +
" minutes" }}
{% endif %}
group:
system:
name: 系统状态
view: no
entities:
- sensor.cpu_temperature
- sensor.last_boot
- sensor.since_last_boot_templated
- sensor.uptime
- senso.processor_use
- sensor.memory_use_percent
- sensor.disk_use_
- sensor.disk_free_
- sensor.disk_use_percent
- sensor.network_in_wlan0
- sensor.network_out_wlan0
- sensor.ipv4_address_wlan0
树莓派系统监视器 中的 CPU使用率 移动到下方卡片中,同时隐藏上方Badge里的同一个项目
感谢指导
|