10-03-2023, 04:56 PM
(10-03-2023, 01:10 PM)admin Wrote: This is the new version of config yaml syntax, remove all mqtt broker code in yaml.
I edited the code to this one. Now, no error and I can see relay32B-1 entity in my Home Assistant now, but it doesn't work - it does not switch the relay. Btw, I can control the relay with Tuya app and also from the relay board webpage, so the board is working well, but still no success integrating it with HA.
mqtt:
switch:
- name: ‘relay32B-1’
unique_id: relay32B-1
state_topic: ‘relay32/4b734209672e642732529f28/state’
command_topic: ‘relay32/4b734209672e642732529f28/set’
payload_on: ‘{“relay1”:{“on”:1}}’
payload_off: ‘{“relay1”:{“on”:0}}’
value_template: ‘{{ value_json.relay01.on }}’
state_on: 1
state_off: 0