#Custom UI
- platform: PhicommAirDetector
name: m1
devices: {'a':{'b0:f8:93:11:35:93':'input_number.phicomm_m1a_led'}}
tokenPath: '/config/phicomm_token.txt'
#Custom UI End
# - platform: template
# sensors:
# m1_pm25:
# friendly_name: 空气质量
# value_template: "{{ states.sensor.m1_a.attributes.pm25 }}"
# unit_of_measurement: μg/m³
# m1_hcho:
# friendly_name: 甲醛
# value_template: "{{ states.sensor.m1_a.attributes.hcho }}"
# unit_of_measurement: mg/m³
# m1_temperature:
# friendly_name: 温度
# value_template: "{{ states.sensor.m1_a.attributes.temperature }}"
# unit_of_measurement: °C
# m1_humidity:
# friendly_name: 湿度
# value_template: "{{ states.sensor.m1_a.attributes.humidity }}"
# unit_of_measurement: "%"
改成
#Custom UI
# - platform: PhicommAirDetector
# name: m1
# devices: {'a':{'b0:f8:93:11:35:93':'input_number.phicomm_m1a_led'}}
# tokenPath: '/config/phicomm_token.txt'
#Custom UI End
- platform: template
sensors:
m1_pm25:
friendly_name: 空气质量
value_template: "{{ states.sensor.m1_a.attributes.pm25 }}"
unit_of_measurement: μg/m³
m1_hcho:
friendly_name: 甲醛
value_template: "{{ states.sensor.m1_a.attributes.hcho }}"
unit_of_measurement: mg/m³
m1_temperature:
friendly_name: 温度
value_template: "{{ states.sensor.m1_a.attributes.temperature }}"
unit_of_measurement: °C
m1_humidity:
friendly_name: 湿度
value_template: "{{ states.sensor.m1_a.attributes.humidity }}"
unit_of_measurement: "%"
|