在configuration.yaml中添加:
configuration.yaml
sensor: - platform: file name: "Host Temperature" # 可以自定义 file_path: /sys/class/hwmon/hwmon0/temp1_input value_template: "{{ int(value)/1000 }}" unit_of_measurement: "°C"