Smart Home Automation Forum
home assistant RC 2022.6 mqtt config update for configuration.yaml - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: KC868-HxB series Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=2)
+--- Thread: home assistant RC 2022.6 mqtt config update for configuration.yaml (/showthread.php?tid=1998)

Pages: 1 2 3 4 5 6


home assistant RC 2022.6 mqtt config update for configuration.yaml - admin - 06-22-2022

home assistant MQTT breaking changes RC 2022.6

before MQTT config format:

switch:
  - platform: mqtt
    name: 'relay11'
    unique_id: relay11
    state_topic: 'relay32/80f9caa4068e78059e31c622/state'
    command_topic: 'relay32/80f9caa4068e78059e31c622/set'
    payload_on: '{"relay1":{"on":1}}'
    payload_off: '{"relay1":{"on":0}}'
    value_template: '{{ value_json.relay1.on }}'
    state_on: 1
    state_off: 0


new MQTT config format:

mqtt:
  switch:
  - name: 'relay11'
    unique_id: relay11
    state_topic: 'relay32/80f9caa4068e78059e31c622/state'
    command_topic: 'relay32/80f9caa4068e78059e31c622/set'
    payload_on: '{"relay1":{"on":1}}'
    payload_off: '{"relay1":{"on":0}}'
    value_template: '{{ value_json.relay1.on }}'
    state_on: 1
    state_off: 0


new MQTT config for two switches format:

mqtt:
  switch:
  - name: 'relay11'
    unique_id: relay11
    state_topic: 'relay32/80f9caa4068e78059e31c622/state'
    command_topic: 'relay32/80f9caa4068e78059e31c622/set'
    payload_on: '{"relay1":{"on":1}}'
    payload_off: '{"relay1":{"on":0}}'
    value_template: '{{ value_json.relay1.on }}'
    state_on: 1
    state_off: 0
   
  - name: 'relay22'
    unique_id: relay22
    state_topic: 'relay32/80f9caa4068e78059e31c622/state'
    command_topic: 'relay32/80f9caa4068e78059e31c622/set'
    payload_on: '{"relay2":{"on":1}}'
    payload_off: '{"relay2":{"on":0}}'
    value_template: '{{ value_json.relay2.on }}'
    state_on: 1
    state_off: 0


RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - heyheyhey - 06-29-2022

Please Let me know why mqtt config update like this? 

1. What is difference? before and after?

2. If not. It has any problem?

I have already updated V.4.44 and attached RC snubber. But Sometimes mqtt in KC868-h32b has no response until reboot.

Thank you.


RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - admin - 06-29-2022

home assistant RC 2022.6 version need this, at 2022.9 version will stop use old mqtt format. details see: https://www.home-assistant.io/blog/2022/06/01/release-20226/


RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - admin - 06-29-2022

(06-29-2022, 08:06 AM)heyheyhey Wrote: Please Let me know why mqtt config update like this? 

1. What is difference? before and after?

2. If not. It has any problem?

I have already updated V.4.44 and attached RC snubber. But Sometimes mqtt in KC868-h32b has no response until reboot.

Thank you.

maybe your home assistant have automatic updated new version?


RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - heyheyhey - 06-30-2022

(06-29-2022, 11:43 AM)admin Wrote: home assistant RC 2022.6 version need this, at 2022.9 version will stop use old mqtt format. details see: https://www.home-assistant.io/blog/2022/06/01/release-20226/

Thanks for your very fast feedback! It was very helpful!


RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - admin - 07-01-2022

you are welcome.


RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - engmohades - 09-09-2022

Is there a change in binary_sensorsyntax?


binary_sensor:
- platform: mqtt
name: 'H32B-input1'
unique_id: H32B-input1
state_topic: 'relay32/3dfd899b71b9d0bbad4f5a9d12345/state'
value_template: '{{ value_json.input1.on }}'
payload_on: 1
payload_off: 0


RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - admin - 09-09-2022

yes, also is changed syntax.


RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - engmohades - 09-10-2022

(09-09-2022, 12:21 PM)admin Wrote: yes, also is changed syntax.

If like thses ? 

mqtt:
  binary_sensor:
  - name: 'H32B-input1'
    unique_id: H32B-input1
    state_topic: 'relay32/xxxxxxxxxxxxxxxxxxxxxx/state'
    value_template: '{{ value_json.input6.on }}'
    payload_on: 1
    payload_off: 0


Please review the formula in the attachment, and if there is an error, please correct it


RE: home assistant RC 2022.6 mqtt config update for configuration.yaml - admin - 09-10-2022

do you have tested output with new config file, work well?
now you only have problem with input mqtt syntax?