Friends of hue switch triggers short press as well when long pressed

Hi, I bought a LAB3D (I believe based on Busch Jaeger) friends of hue switch and want to set it up in home assistant using both long and short presses for different functions.
My issue is that when I do a long press, it also triggers a short press. See the picture of my log.
Does anyone know a workaround or fix to this problem?

Both long and short presses work if I configure it through the Hue app.

Thanks.

Have a look here, unfortunately this is indented behavior.

1 Like

Thank you for the quick reply.

Do you know if I would be able to use long press if I added the switch through a zigbee dongle directly to Home Assistant?

Do not know, as my Z2M network is on channel 13 and the friends of hue switches only work on 11, 15, 20 and 25. Be aware the channel is chosen during pairing, the 4 buttons activating different channels when hold for 10 sec.

If you succeed, please let me know. I might use the time to change to channel 11. I have more and 80 devices, so not done for fun.

As I only have two switches I ended up making an automation that turns on an input boolean toggle (one for each button on the switch) when the button is held down. Then when a short press is registered I have that input boolean as a condition.

Here is my action for button number one made with trigger id. I’m new to HA and coding so it might not be the most optimal way of doing it.

choose:
  - conditions:
      - condition: trigger
        id: 1 held down
    sequence:
      - if:
          - condition: state
            entity_id: input_boolean.button1
            state: "off"
        then: 
          #actions for long press here
      - service: input_boolean.turn_on
        data: {}
        target:
          entity_id: input_boolean.button1
      #actions for held down here
  - conditions:
      - condition: trigger
        id: 1 short press release
    sequence:
      - if:
          - condition: state
            entity_id: input_boolean.button1
            state: "on"
        then:
          - service: input_boolean.turn_off
            data: {}
            target:
              entity_id: input_boolean.button1
        else:
          #actions for short press here

#for some reason if you hold the button down for a (very) long time the short press is not fired
#so to make sure input boolean is reset, I added this
  - conditions:
      - condition: trigger
        id: 1 long press
    sequence:
      - service: input_boolean.turn_off
        data: {}
        target:
          entity_id: input_boolean.button1

I have created a blueprint based on the overall idea from Peter.

I have now added my FoH switches through zigbee2mqtt through a SkyConnect, which has significantly improved the delay and made me able to make dimming a light more smooth as it sends a “release” action.

I’ve set it up using this blueprint: Zigbee2MQTT enOcean PTM 215Z (Friends of Hue) switch