01-24-2023, 03:01 PM
I updated my configuration file as shown in the attachment
But it didn't work
Please use AnyDisk to help me
SAMPLE:
mqtt:
broker: 192.168.1.42
port: 1883
username: mqtt
password: NNNNNNNN
switch:
- name: 'switch-1'
unique_id: switch-1
state_topic: 'relay32/XXXXXXXXXXXXXXXX/state'
command_topic: 'relay32/XXXXXXXXXXXXXXXX/set'
payload_on: '{"relay1":{"on":1}}'
payload_off: '{"relay1":{"on":0}}'
value_template: '{{ value_json.relay1.on }}'
state_on: 1
state_off: 0
But it didn't work
Please use AnyDisk to help me
SAMPLE:
mqtt:
broker: 192.168.1.42
port: 1883
username: mqtt
password: NNNNNNNN
switch:
- name: 'switch-1'
unique_id: switch-1
state_topic: 'relay32/XXXXXXXXXXXXXXXX/state'
command_topic: 'relay32/XXXXXXXXXXXXXXXX/set'
payload_on: '{"relay1":{"on":1}}'
payload_off: '{"relay1":{"on":0}}'
value_template: '{{ value_json.relay1.on }}'
state_on: 1
state_off: 0