m = Map("fancontrol", "风扇控制", "根据温度配置风扇控制设置。")

s = m:section(TypedSection, "fan", "设置")
s.anonymous = true

enabled = s:option(Flag, "fan_enabled", "启用风扇控制", "启用或禁用风扇控制。")
enabled.default = 1
enabled.rmempty = false

temp_low = s:option(Value, "temp_low", "低温阈值 (°C)")
temp_low.datatype = "uinteger"
temp_low.default = 40

temp_mid = s:option(Value, "temp_mid", "中温阈值 (°C)")
temp_mid.datatype = "uinteger"
temp_mid.default = 50

temp_high = s:option(Value, "temp_high", "高温阈值(°C)")
temp_high.datatype = "uinteger"
temp_high.default = 60

speed_low = s:option(Value, "speed_low", "低速 PWM 值 (%)")
speed_low.datatype = "range(0,100)"
speed_low.default = 20

speed_mid = s:option(Value, "speed_mid", "中速 PWM 值 (%)")
speed_mid.datatype = "range(0,100)"
speed_mid.default = 50

speed_high = s:option(Value, "speed_high", "高速 PWM 值 (%)")
speed_high.datatype = "range(0,100)"
speed_high.default = 80

return m