Emulated Hue and Harmony home control long press, short press, plus, minus buttons

Hello everybody.
I have configured a raspberry pi with HASS and now I wish to intregrate my pi with my logitech harmony companion. I’ve created 3 scripts for control a IR towerfan (ON/OFF/SWING).
Now I need to find a way for control it with only one button:
“BUTTON 1: FAN
SHORT PRESS: ON
LONG PRESS: OFF
TILT BUTTON (+) Swing the fan
TILT BUTTON (-) Swing the fan”
How can do it ? The harmony software doesn’t autorize any customization.
Thanks to help me.
Cordially.

EDIT:
I found how to make a virtual switch based on scripts
light:

  • platform: template
    lights:
    harmony_virtual:
    friendly_name: “FAN SKIRON”
    turn_on:
    service: script.1564343347667
    turn_off:
    service: script.1564343647430

But sometimes on the harmony application, the fake light brightness sets himself to 0%, that causes the off instruction on each push to the assigned home button.
How can ignore the dimmable component of the switch ?

EDIT2: The emulated light wasn’t a good idea, I remplaced that by a fake switch.

switch:

  • platform: template
    switches:
    fanskiron:
    value_template: “{{ is_state(‘script.1564343347667’, ‘on’) }}”
    turn_on:
    service: script.1564343347667
    turn_off:
    service: script.1564343647430

Now, I have a on/off switch successfully added on my harmony controller but the swing option is still missing.
It is possible to add this function for the “plus” or “minus” button to the fanskiron switch ?
Thanks for answer me.