本帖最后由 Zerolone 于 2024-9-8 11:45 编辑
翻译自:https://www.home-assistant.io/integrations/switch.mqtt/
翻译基本上就是用gpt翻译的, 有需要的朋友可以自取。
这个网页的文档,附件一个是图片版, 一个是html版(解开zip文件)
以后如果还有其他翻译的, 会考虑合并做成chm文件
加上自己学了几天的配置文件
单路
- switch:
unique_id: s128
name: "s128"
state_topic: "s128/status"
command_topic: "s128/set"
availability:
- topic: "s128/available"
payload_on: "ON"
payload_off: "OFF"
state_on: "ON"
state_off: "OFF"
optimistic: false
qos: 0
retain: true
多路
- switch:
unique_id: s131_led
name: "s131_led"
state_topic: "s131/status/led"
command_topic: "s131/set/led"
availability:
- topic: "s131/available/led"
payload_on: "ON"
payload_off: "OFF"
state_on: "ON"
state_off: "OFF"
optimistic: false
qos: 0
retain: true
- switch:
unique_id: s131_switch
name: "s131_switch"
state_topic: "s131/status/switch"
command_topic: "s131/set/switch"
availability:
- topic: "s131/available/switch"
payload_on: "ON"
payload_off: "OFF"
state_on: "ON"
state_off: "OFF"
optimistic: false
qos: 0
retain: true
|