How to use - This device can not be added from the UIThis device can not be added from the UI
You can add this device by adding it to your 'configuration.yaml'. See the documentation for more information.
https://www.home-assistant.io/integrations/systemmonitor I had to modify the existing sensor section of my configuration.yaml file .
Step 1:在HA的传感器(sensor)模组中,提供了监测cpu和内容使用率等的平台,如下:(添加至configuration.yaml中)
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
- type: memory_use_percent
- type: processor_use
- type: last_boot
If you are adding multiple devices, then it would look like this:
sensor:
- platform: xiaomi_miot
name: server_plug # 自定义名称
host: 192.168.101.44 # 插座IP
token: 2408ba10c691feeb2e7cef627dc0683d # 前面获取到的token
max_properties: 10
default_properties_getter: get_properties
default_properties:
- "{'did': 'power', 'piid': 1, 'siid': 2}"
- "{'did': 'temperature', 'piid': 6, 'siid': 2}"
- "{'did': 'indicator_light', 'piid': 1, 'siid': 3}"
- "{'did': 'on_duration', 'piid': 1, 'siid': 4}"
- "{'did': 'off_duration', 'piid': 2, 'siid': 4}"
- "{'did': 'countdown', 'piid': 3, 'siid': 4}"
- "{'did': 'task_switch', 'piid': 4, 'siid': 4}"
- "{'did': 'countdown_info', 'piid': 5, 'siid': 4}"
- "{'did': 'power_consumption', 'piid': 1, 'siid': 5}"
- "{'did': 'electric_current', 'piid': 2, 'siid': 5}"
- "{'did': 'voltage', 'piid': 3, 'siid': 5}"
- "{'did': 'electric_power', 'piid': 6, 'siid': 5}"
- platform: template
sensors:
phil_status:
value_template: '{{ states.input_select.phil_status_dropdown.state }}'
friendly_name: 'Phil'
helen_status:
value_template: '{{ states.input_select.helen_status_dropdown.state }}'
friendly_name: 'Helen'
- platform: systemmonitor
resources:
- type: disk_use_percent
- type: memory_use_percent
- type: processor_use
- type: last_boot
full
# Example configuration.yaml entry with all entry types (delete/comment out as necessary)
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
- type: disk_use
- type: disk_free
- type: memory_use_percent
- type: memory_use
- type: memory_free
- type: swap_use_percent
- type: swap_use
- type: swap_free
- type: load_1m
- type: load_5m
- type: load_15m
- type: network_in
arg: eth0
- type: network_out
arg: eth0
- type: throughput_network_in
arg: eth0
- type: throughput_network_out
arg: eth0
- type: packets_in
arg: eth0
- type: packets_out
arg: eth0
- type: ipv4_address
arg: eth0
- type: ipv6_address
arg: eth0
- type: processor_use
- type: processor_temperature
- type: last_boot