Smart Home Automation Forum

Full Version: entity doesn't work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I had my KC868-A8 running under ESPHOME. With KCS firmware ESPHOME doesn't work...
I configure my MQTT server and it is connected with KCS to home assistant.
Now I tried to use the Output-1 switch. I edit my configuration.yaml and write:

mqtt:

  switch:

  - name: 'output-1'
    unique_id: output-1
    state_topic: 'KC868_A8/4091519110F8/state'
    command_topic: 'KC868_A8/4091519110F8/set'
    payload_on:  '{"relay1":{"on":1}}'
    payload_off:  '{"relay1":{"on":0}}'
    value_template: '{{ value_json.relay1.on }}'
    state_on: 1
    state_off: 0

I can see the entity but it doesn't work. 
I'm beginer. Can you help me?
here is KCS mqtt protocol: https://www.kincony.com/forum/showthread.php?tid=2529
in "KCS" use : {"output1":{"value":true}}
not '{"relay1":{"on":1}}'

value_template: '{{ value_json.relay1.on }}' should be value_template: '{{ value_json.output1.value }}'

here is mqtt config demo for A32, A8 is same: https://www.kincony.com/forum/showthread.php?tid=2543
Thank you very much but I am not be able to make it works
Attached send you some pintures.

Now my code is:


mqtt:
  switch:
  - name: 'output1'
    unique_id: output1
    command_topic: 'KC868_A8/4091519110F8/set'
    state_topic: 'KC868_A8/4091519110F8/state'
    payload_on:  '{"output1":{"value":true}}'
    payload_off:  '{"output1":{"value":false}}'
    value_template: '{{ value_json.output1.value }}'
    state_on: true
    state_off: false
command_topic: 'KC868_A8/4091519110F8/set' should use 'KC868_A8/4091519110F8/SET'
state_topic: 'KC868_A8/4091519110F8/state' should use 'KC868_A8/4091519110F8/STATE'

SET and STATE should be capitalized
(02-06-2023, 11:03 PM)admin Wrote: [ -> ]command_topic: 'KC868_A8/4091519110F8/set'      should use        'KC868_A8/4091519110F8/SET'
    state_topic: 'KC868_A8/4091519110F8/state'    should use        'KC868_A8/4091519110F8/STATE'

SET    and    STATE      should be capitalized

Now it works.
Thank you very much
ok, good.