Hi,
I am trying to rewrite the yaml for a double switch from Aqara so it matches the changes recently made to MQTT. I cannot get it to work properly.
What I have is:
switch:
#
# A-BU-05 Keuken (QBKG12LM), dubbele schakelaar Links
- unique_id: licht_onder_de_kastjes
object_id: licht_onder_de_kastjes
name: "Licht onder de kastjes"
state_topic: "zigbee2mqtt/0x00158d0001e6abdd/left/get"
command_topic: "zigbee2mqtt/0x00158d0001e6abdd/left/set"
payload_on: "ON"
payload_off: "OFF"
state_on: "ON"
state_off: "OFF"
optimistic: true
qos: 1
#
# A-BU-05 Keuken (QBKG12LM), dubbele schakelaar Rechts
- unique_id: grote_keukenlicht
object_id: grote_keukenlicht
name: "Grote Keukenlicht"
state_topic: "zigbee2mqtt/0x00158d0001e6abdd/right/get"
command_topic: "zigbee2mqtt/0x00158d0001e6abdd/right/set"
payload_on: "ON"
payload_off: "OFF"
state_on: "ON"
state_off: "OFF"
optimistic: true
qos: 1
But the switch is not working correcty.
Before I used value_template: “{{ value_json.state }}” to get the state but this is obsolete now.
What is the right yaml code to use on this switch?