ZigBee2MQTT and Aqara DoorWindow Sensor

  1. Remove MQTT Command Topic.
  2. Remove /contact from MQTT State Topic.
  3. Check ‘Show advanced’.
  4. Set ‘Incoming Value Transformations’ to JSONPATH:$.contact
  5. Optional: Set Custom Off/On/Open/Closed Values to your needs (use false and true)

Further reading: