网上好多例子都是旧版写法。参考官方的吧:MQTT HVAC
mqtt:
climate:
- name: rilikongtiao1
unique_id: rilikongtiao1
modes:
- "off"
- "heat"
- "dry"
- "cool"
- "fan_only"
fan_modes:
- "high"
- "medium"
- "low"
- "auto"
- "silent"
power_command_topic: "homeassistant/climate/zhonghong/ac_0_4/power/set"
mode_command_topic: "homeassistant/climate/zhonghong/ac_0_4/mode/set"
current_temperature_topic: "homeassistant/climate/zhonghong/ac_0_4/cur_temp/state"
mode_state_topic: "homeassistant/climate/zhonghong/ac_0_0/mode/state"
temperature_command_topic: "homeassistant/climate/zhonghong/ac_0_0/temp/set"
temperature_state_topic: "homeassistant/climate/zhonghong/ac_0_0/temp/state"
fan_mode_command_topic: "homeassistant/climate/zhonghong/ac_0_4/fan/set"
fan_mode_state_topic: "homeassistant/climate/zhonghong/ac_0_4/fan/state"
precision: 1.0
min_temp: 16
max_temp: 30
|