09-29-2022, 04:52 AM
SW is a message auto feedback to home assistant when you pressed the key. if you want add INPUT, you should:
binary_sensor:
name: 'input-1'
unique_id: input-1
state_topic: 'server/xxxxxxxxxxxxxxxxxxxxxxxx/state'
value_template: '{{ value_json.input1.on }}'
payload_on: 1
payload_off: 0
binary_sensor:
name: 'input-1'
unique_id: input-1
state_topic: 'server/xxxxxxxxxxxxxxxxxxxxxxxx/state'
value_template: '{{ value_json.input1.on }}'
payload_on: 1
payload_off: 0