Sonoff button will not turn on smart plug

Smart plug is also Sonoff, but will not switch on.

This automation has been set to longpress. On double press I have set to turn a Tuya light switch on (local) and that works without any issue. Prior to moving to MQTT this was working with ZHA (but was having an incredible amount of disconnects, so upgraded to MQTT).

logs: 2021-08-20 10:31:39 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities switch.10007b567c

NB: entity does exist and works aok via lovelace.

- id: '1629407896847'
  alias: 'Office Button: Fan'
  description: ''
  trigger:
  - platform: device
    domain: mqtt
    device_id: efcfcebb6059869b1d8e1588a59568c7
    type: action
    subtype: long
    discovery_id: 0x00124b0022e95a88 action_long
  condition: []
  action:
  - service: switch.toggle
    target:
      entity_id: switch.10007b567c
  mode: single

Update, the code is dead as above - may have been left over from when I used ZHA.

However, test code as below, the Sonoff button states are single, double and hold (note that the only entities are sensor.hallway_button_action, sensor.hallway_button_battery and sensor.hallway_button_linkquality).

My code obviously doesn’t work (lol), as I don’t know how to program this to check for state. Any help appreciated.

- id: '1629489559638'
  alias: test
  description: ''
  trigger:
  - platform: event
    event_type: state
    event_data:
      sensor.hallway_button_action: single
  condition: []
  action:
  - service: switch.toggle
    target:
      entity_id: switch.10007b48a8
  mode: single