script:
reboot_ha:
alias: reboot_ha
sequence:
- service: homeassistant.restart
reboot_linux_system:
alias: reboot_linux_system
sequence:
- service: shell_command.linux_system
turn_on_all_auto:
alias: turn_on_all_auto
sequence:
- service: automation.turn_on
turn_off_all_auto:
alias: turn_off_all_auto
sequence:
- service: automation.turn_off
host_reboot:
alias: host_reboot
sequence:
- service: hassio.host_reboot
host_shutdown:
alias: host_shutdown
sequence:
- service: hassio.host_shutdown
snapshot_full:
alias: snapshot_full
sequence:
- service: hassio.snapshot_full
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /home
- type: disk_free
arg: /home
- type: memory_use
- type: memory_free
- type: network_in
arg: eth0
- type: network_out
arg: eth0
- type: ipv4_address
arg: eth0
- type: processor_use
- type: last_boot
- platform: uptime
name: 'Time Online'
unit_of_measurement: hours
- platform: command_line
name: Latest HA Version
command: python3 -c "import requests; print(requests.get('https://pypi.python.org/pypi/homeassistant/json').json()['info']['version'])"
command_timeout: 60
scan_interval: 1800
- platform: command_line
name: Installed HA Version
command: "head -5 /config/.HA_VERSION"
- platform: command_line
name: cpu_temp
command: "cat /sys/class/hwmon/hwmon0/temp1_input"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(2) }}'
homeassistant:
customize:
sensor.cpu_temp:
friendly_name: CPU温度
hidden: false
homebridge_hidden: true
sensor.processor_use:
friendly_name: CPU占用
icon: mdi:select-inverse
hidden: false
homebridge_hidden: true
sensor.memory_use:
friendly_name: 内存占用
hidden: false
homebridge_hidden: true
sensor.memory_free:
friendly_name: 内存剩余
hidden: false
homebridge_hidden: true
sensor.disk_use_percent_home:
friendly_name: 磁盘占用
hidden: false
homebridge_hidden: true
sensor.disk_free_home:
friendly_name: 磁盘可用
hidden: false
homebridge_hidden: true
sensor.ipv4_address_eth0:
friendly_name: 网络信息
hidden: false
icon: mdi:lan
homebridge_hidden: true
sensor.network_out_eth0:
friendly_name: 发送数据
hidden: false
icon: mdi:upload-network
homebridge_hidden: true
sensor.network_in_eth0:
friendly_name: 接收数据
hidden: false
icon: mdi:download-network
homebridge_hidden: true
sensor.last_boot:
friendly_name: 系统启动
unit_of_measurement: '小时'
hidden: false
homebridge_hidden: true
sensor.time_online:
icon: mdi:clock-alert
friendly_name: '系统运行'
unit_of_measurement: '小时'
homebridge_hidden: true
sensor.latest_ha_version:
friendly_name: '最新版本'
icon: mdi:cloud-download
homebridge_hidden: true
sensor.installed_ha_version:
icon: mdi:clipboard-check
friendly_name: '当前版本'
homebridge_hidden: true
sensor.connected_clients:
icon: mdi:account-multiple
friendly_name: '连接用户'
unit_of_measurement: '个'
homebridge_hidden: true
sensor.badlogin:
icon: mdi:alert-circle
friendly_name: '失败尝试'
homebridge_hidden: true
script.turn_on_all_auto:
friendly_name: 一键激活
icon: mdi:checkbox-marked-outline
hidden: false
homebridge_hidden: true
script.turn_off_all_auto:
friendly_name: 一键取消
icon: mdi:cancel
hidden: false
homebridge_hidden: true
script.reboot_ha:
friendly_name: 重启Hassio
icon: mdi:home-assistant
hidden: false
homebridge_hidden: true
script.snapshot_full:
friendly_name: 备份Hassio
icon: mdi:content-save
hidden: false
homebridge_hidden: true
script.reboot_linux_system:
friendly_name: 重启服务器
icon: mdi:tumblr-reblog
hidden: false
homebridge_hidden: true
script.host_reboot:
friendly_name: 重启服务器
icon: mdi:tumblr-reblog
hidden: false
homebridge_hidden: true
script.host_shutdown:
friendly_name: 关闭服务器
icon: mdi:power
hidden: false
homebridge_hidden: true
automation.home_assistant_start:
icon: mdi:message-text
friendly_name: 系统重启通知
homebridge_hidden: true
|