Alarm_control_panel manual_mqtt json command and code parsing

Hi everyone!

I have been slowly getting my HA Alarm Control Panel configured to receive ARM_HOME, ARM_AWAY and DISARM messages over MQTT. I’m very nearly there! but i’m stuck with how to configure HS to parse the command and the code from the MQTT message I am passing it:

home/alarm/set {"command": "DISARM", "code": "0000"}

I can’t seem to find the answer anywhere, I think I need a value template for the JSON i’m passing in for both the code and the command?

Any suggestions most welcome :slight_smile:

HA config for alarm_control_panel:

alarm_control_panel:
  - platform: manual_mqtt
    state_topic: home/alarm
    command_topic: home/alarm/set
    name: Home Alarm
    code: 0000
    code_arm_required: false
    pending_time: 30
    delay_time: 30
    trigger_time: 600
    disarmed:
      trigger_time: 0
    armed_home:
      pending_time: 0
      delay_time: 0
    triggered:
     pending_time: 0