Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
home assistant RC 2022.6 mqtt config update for configuration.yaml
#1
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


Attached Files Image(s)
       

.txt   before.txt (Size: 354 bytes / Downloads: 260)
.txt   now-2-switches.txt (Size: 695 bytes / Downloads: 322)
.txt   now.txt (Size: 352 bytes / Downloads: 330)
Reply


Messages In This Thread
home assistant RC 2022.6 mqtt config update for configuration.yaml - by admin - 06-22-2022, 01:00 AM

Forum Jump:


Users browsing this thread: