it as same as your H32B Pro, just change the topic, for example (this config demo for output1 of KC868-Server, you just replace UID by yourself):
mqtt:
switch:
- name: 'output-1'
unique_id: output-1
state_topic: 'server/8ae082ec66f37db231cf2b8f/state'
command_topic: 'server/8ae082ec66f37db231cf2b8f/set'
payload_on: '{"relay1":{"on":1}}'
payload_off: '{"relay1":{"on":0}}'
value_template: '{{ value_json.relay1.on }}'
state_on: 1
state_off: 0
here is sample config file for KC868-Server yaml.
KC868-Server-home-assistant-MQTT_config_202212.txt (Size: 9.26 KB / Downloads: 55)
mqtt:
switch:
- name: 'output-1'
unique_id: output-1
state_topic: 'server/8ae082ec66f37db231cf2b8f/state'
command_topic: 'server/8ae082ec66f37db231cf2b8f/set'
payload_on: '{"relay1":{"on":1}}'
payload_off: '{"relay1":{"on":0}}'
value_template: '{{ value_json.relay1.on }}'
state_on: 1
state_off: 0
here is sample config file for KC868-Server yaml.
KC868-Server-home-assistant-MQTT_config_202212.txt (Size: 9.26 KB / Downloads: 55)