MQTT sensor config with Shelly1 in detached mode with Bell Press switch

Hi All! Just starting to get into MQTT here and need a bit of help to get in the right direction please :slight_smile: I have a Shelly 1 in detached mode with a bell press switch connected to it. At the moment I have this:

mqtt:  sensor:    - name: "Shelly Downstairs Button"      unique_id: "shelly_downstairs_button"      state_topic: "shellies/shelly1-349454713C2B/input/0"

Which gives me a sensor that changes from 0 to 1 when I press the button, then back to 0. Perfect, I can run automations from this! However, this is not capturing the short and long press events. Whatโ€™s the best way to set this up so I can trigger different automations based on short or long presses?

Message 7 received on shellies/shelly1-349454713C2B/input/0 at 5:18 PM:
0
QoS: 0 - Retain: false
Message 6 received on shellies/shelly1-349454713C2B/input_event/0 at 5:18 PM:
{"event":"L","event_cnt":96}
QoS: 0 - Retain: false
Message 5 received on shellies/shelly1-349454713C2B/longpush/0 at 5:18 PM:
1
QoS: 0 - Retain: false
Message 4 received on shellies/shelly1-349454713C2B/input/0 at 5:18 PM:
1
QoS: 0 - Retain: false
Message 3 received on shellies/shelly1-349454713C2B/input/0 at 5:18 PM:
0
QoS: 0 - Retain: false
Message 2 received on shellies/shelly1-349454713C2B/input_event/0 at 5:18 PM:
{"event":"S","event_cnt":95}
QoS: 0 - Retain: false
Message 1 received on shellies/shelly1-349454713C2B/longpush/0 at 5:18 PM:
0
QoS: 0 - Retain: false
Message 0 received on shellies/shelly1-349454713C2B/input/0 at 5:18 PM:
1

Thanks!