Hello, I’m trying to configure an 8-channel relay module via MQTT. The module has already communicated with Home Assistant, but it doesn’t appear in the entities.
Below is the yaml code placed in configuration.yaml
Can someone help me?
mqtt:
- switch:
- name: “Molsmart Switch-1”
unique_id: molsmart-relay9365384
state_topic: “home/molsmart/switch1/state”
command_topic: “home/molsmart/switch1/set”
payload_on: “ON”
payload_off: “OFF”
state_on: “ON”
state_off: “OFF”
optimistic: false
qos: 0
retain: true - name: “Molsmart Switch-2”
unique_id: molsmart-relay9365384
state_topic: “home/molsmart/switch2/state”
command_topic: “home/molsmart/switch2/set”
payload_on: “ON”
payload_off: “OFF”
state_on: “ON”
state_off: “OFF”
optimistic: false
qos: 0
retain: true - name: “Molsmart Switch-3”
unique_id: molsmart-relay9365384
state_topic: “home/molsmart/switch3/state”
command_topic: “home/molsmart/switch3/set”
payload_on: “ON”
payload_off: “OFF”
state_on: “ON”
state_off: “OFF”
optimistic: false
qos: 0
retain: true - name: “Molsmart Switch-4”
unique_id: molsmart-relay9365384
state_topic: “home/molsmart/switch4/state”
command_topic: “home/molsmart/switch4/set”
payload_on: “ON”
payload_off: “OFF”
state_on: “ON”
state_off: “OFF”
optimistic: false
qos: 0
retain: true - name: “Molsmart Switch-5”
unique_id: molsmart-relay9365384
state_topic: “home/molsmart/switch5/state”
command_topic: “home/molsmart/switch5/set”
payload_on: “ON”
payload_off: “OFF”
state_on: “ON”
state_off: “OFF”
optimistic: false
qos: 0
retain: true - name: “Molsmart Switch-6”
unique_id: molsmart-relay9365384
state_topic: “home/molsmart/switch6/state”
command_topic: “home/molsmart/switch6/set”
payload_on: “ON”
payload_off: “OFF”
state_on: “ON”
state_off: “OFF”
optimistic: false
qos: 0
retain: true - name: “Molsmart Switch-7”
unique_id: molsmart-relay9365384
state_topic: “home/molsmart/switch7/state”
command_topic: “home/molsmart/switch7/set”
payload_on: “ON”
payload_off: “OFF”
state_on: “ON”
state_off: “OFF”
optimistic: false
qos: 0
retain: true - name: “Molsmart Switch-8”
unique_id: molsmart-relay9365384
state_topic: “home/molsmart/switch8/state”
command_topic: “home/molsmart/switch8/set”
payload_on: “ON”
payload_off: “OFF”
state_on: “ON”
state_off: “OFF”
optimistic: false
qos: 0
retain: true
- name: “Molsmart Switch-1”