Philips Hue, Friends of Hue switch 4 buttons for Hue Integration

In dutch again:-) However I translated it:-)

Your version of the blueprint do NOT work any more, as of HA version 2023.08. As described in “post 1” you need to use the blueprint from “post 32”. Just copy the new blueprint on top of the existing.

The new version does not use the helper.

copied the wrong text again. Sorry. I will continue with this this week, thank you in advance. I will make sure that I paste the English text from now on.

Can I now also easily set a lamp to dim or brighten in the blueprint?

You can use the “repeat” to run an action which dim-/dim+. I do not use it, hence have not tried my self. I use the switch only for scenes.

The “light.on” service use the brightness_step_pct. Easy to find in the GUI when defining the service call. Remember the “repeat” will run app 2 times a second.

Good morning.

Is this the right way to get different scenes behind one button?

This is right for the buttons, however will only set scenes on button 3, and it will set all scenes on button 3.

The scene for button 1 should go int the button 1 actions, scene for button 2 in the actions for button 2 etc

This is also what I am looking for, can someone elaborate how/if the follwing would work:

  1. Button 1 short press: Turn on LED bulb(s)
  2. Button 2 short press: Turn off LED bulb(s)
  3. Button 1 repeat: Increase brightness with 10%
  4. Button 2 repeat: Decrease brightness with 10%

it is also possible to get multiple scenes behind 1 button. so if I press the top right button once, it starts scene 1, but if I press the button again it starts scene 2 and so on.

That is possible, however will require some code and a helper. Problem is, scenes do not have a state in HA, hence you can not read the current state, hence can not determine which one to switch on.

I would use “short release” and “long release”, which will give 2 different scenes.

Thomas, your idea is correct, and it will work.

Based on the bulbs and behaviour, use of the “short release” might be better. You idea will “turn on” first and then change up/down. “Short release” will just turn up/down. Think this will result in different “starting points”, where the “short press” will re-implement the defined starting brightness.

Before you use to much time, check the speed of the bulb’s change. It might not be a smooth transistion.

I recently moved all my hue devices from the hue hub to HA directly (just before the big controversy). I have 3 ABB Busch-Jaeger EnOcean smart switches. These are now my only smart home devices that are not working.

Am I correct to assume, that what is suggested in this thread does not work for me? I.e., does not work without a hue bridge? Thanks in advance. Can you direct me (to a thread) to how I can get these switches to work? (I am using ZHA)

Great post, very interesting.
I have a feller FoH 4 button switch. I have added it to the Phoscon app and I see it as device, in the logbook of the phoscon integration I can see the events pressing the buttons.
I added the blueprint of post #32, but I don’t have an entity per button.
Can you please help me how to create these?

The blue-print is only for FoH devices connected using a Hue bridge and the HA Hue integration.

I have never looked for a ZHA blueprint, but it might be there.

You should be able to create the needed automations directly in HA. Choose the device create a automation. You will need to create several automations, however it will work.

Same answer as in post 53, however you need a conbee blueprint.

Oh great! even better, I connected the FoH directly to the Hue bridge and it worked immediately using the blueprint in #32.

I cannot understand the “repeat” when is it trigger, is that for the multiple press? cause I cannot make it work…

If you hold a button for more than 1 second, then “repeat” trigger app every ½ second. It will be followed by a “long press” when you release the button again. This might make it hard to see the “repeat” on the screen. Use “trace” on the automation, and it will show the “repeat” actions just before the “long release”

I do not use “repeat”, however in post #46 and post #50 a small discussion on how to use this for dimming.

1 Like

Regarding the double (multiple tap) logically should be:

if initial_press is followed by short_release and another short_release within 1 second from the same button than is a double tap

and change the short_release in a was so that:

if initial_press is followed by short_release and the time of 1 second expires than is a single tap

Would this be correct? Is this something that can be implemented directly in the blueprint or should should further development?

Your idea is right, however I’m not sure how to implement it easily in the blueprint. Might need a helper or alike.

I might look into this later, however not before November/december. Will message you for help with some testing, if needed.

I tried to implement myself, could not figure it out how to integrate into the blue print but this is what done:
I created a helper counter to count how many times the button B3 is press: foh_b3_double_tap_counter and I wrote the script below which should be called every time there is a short_release.
When the script executes, increments the counter, if counter is 1, it waits 5 seconds and turns off the light. If the counter is 2 it turns on the light. The idea is that if there is a second press within 5 sec, the script will be killed mode: restart a new instance starts increases the counter to 2 etc.

I call the script on short_release from button 3 in my example:

    button_3_short_release:
      - service: script.turn_on
        target:
          entity_id: script.foh_b3_single_double_tap
        data: {}

Script to detect single/double tap of button 3

alias: FoH B3 Single/Double Tap
sequence:
  - service: counter.increment
    data: {}
    target:
      entity_id: counter.foh_b3_double_tap_counter
  - if:
      - condition: state
        entity_id: counter.foh_b3_double_tap_counter
        state: "1"
    then:
      - delay:
          hours: 0
          minutes: 0
          seconds: 5
          milliseconds: 0
      - type: turn_off
        device_id: 71aa43dc88b7d750f08d35cb70b3a496
        entity_id: 82f9bc14d2fcbcc625802ba129f70ec8
        domain: light
      - service: counter.reset
        data: {}
        target:
          entity_id: counter.foh_b3_double_tap_counter
    else:
      - if:
          - condition: state
            entity_id: counter.foh_b3_double_tap_counter
            state: "2"
        then:
          - type: turn_on
            device_id: 71aa43dc88b7d750f08d35cb70b3a496
            entity_id: 82f9bc14d2fcbcc625802ba129f70ec8
            domain: light
            brightness_pct: 100
      - service: counter.reset
        data: {}
        target:
          entity_id: counter.foh_b3_double_tap_counter
mode: restart
icon: mdi:light-switch-off

Im not home, so this from my iPad, hence no nice cut/paste and no testing.

Your idea is good and should work. That it is not working, I believe it is due to the script being initiated from the automation. The automation is in “queue” mode, hence will initiate new scripts. Not sure this works as intended with “restart”.

What you have build should work if you do it directly in the automation (using the blueprint). Only one small change to the blueprint, you should change the “mode” from queue to “restart”, app 1/2 down in the blueprint, just change the text and remove the queue length line, right below. Remember to reload automations, or restart HA to load the change in the blueprint.