Simulate button long press

Hi everybody,

I need to simulate with the HA switch component the button long press with duration in seconds.
This behavior is necessary to simulate a remote control button of the relay.

Thanks for your support.

Regards
Francesco

Little old question, but others might also find it useful. Try script (https://www.home-assistant.io/components/script/), you can click it in the UI configuration. Time while pressed is up to you, this one is for a short press :slight_smile:

scripts.yaml:
  '1537215460700':
    alias: light
    sequence:
    - alias: ''
      data:
        entity_id: switch.phat_out_1
      service: switch.turn_on
    - delay: 00:00:00.10
    - alias: ''
      data:
        entity_id: switch.phat_out_1
      service: switch.turn_off