本帖最后由 缥缈的孤鸿 于 2019-5-31 14:25 编辑
设置wifi、MQTT连接之后,会显示MQTT topic信息,然后配置package就行了。
sensor:
- platform: mqtt
name: "m1_temperature"
state_topic: "MICO_**********/tmp"
unit_of_measurement: "°C"
- platform: mqtt
name: "m1_humidity"
state_topic: "MICO_**********/hum"
unit_of_measurement: "%"
- platform: mqtt
name: "m1_pm25"
state_topic: "MICO_**********/pm25"
unit_of_measurement: "μg/m³"
- platform: mqtt
name: "m1_hcho"
state_topic: "MICO_**********/hcho"
unit_of_measurement: "mg/m³"
homeassistant:
customize:
sensor.m1_hcho:
friendly_name: 客厅甲醛
icon: mdi:biohazard
sensor.m1_humidity:
friendly_name: 客厅湿度
icon: mdi:water-percent
sensor.m1_pm25:
friendly_name: 客厅PM2.5
icon: mdi:blur
sensor.m1_temperature:
friendly_name: 客厅温度
icon: mdi:thermometer
|