How to enable multi tap and dimming on White switch

Hello,

I have a new switch installed using Home Assistant but I don’t see any way to either use the switch to dim the lights or to use multi taps. I am guessing everything needs to be an automation if in Smart Bulb mode. These are the only options I see:

1 Like

Are you running HA 2024.8.0? They just released support for Matter multi-taps and added additional stuff, per the release notes:

https://www.home-assistant.io/blog/2024/08/07/release-20248/#matter-updates

Matter

Multi-press events are now split into their own dedicated event type, such as `multi_press_1`, `multi_press_2`, etc., making it easier to automate multiple presses instead of looking manually at the number of presses count.

If you have used the current event type in your automations, you will need to update them to use the new event types.

([@marcelveldt](https://github.com/marcelveldt) - [#122191](https://github.com/home-assistant/core/pull/122191)) ([documentation](https://www.home-assistant.io/integrations/matter))
1 Like

Yes I am running 2024.8. I had to search pretty hard but I found that these options appear at the entity level (event.*switch_config) but not the device level. Is that what should be expected?

How does dimming work in smart bulb mode? Is there some place to go to figure out how to program this thing?

Does anyone know if there is a Home Assistant blueprint available for the white series yet???

Edit: I finished the blueprint which can be found here:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Here’s a good starting point. All you have to do is replace each occurrence of bath_fan with your device name.

I might make this into a blueprint next week if I have time.

alias: Bath Fan Tap Sequences
description: ""
trigger:
  - platform: state
    entity_id:
      - event.bath_fan_up
    not_from:
      - unknown
      - unavailable
    id: up
  - platform: state
    entity_id:
      - event.bath_fan_down
    not_from:
      - unknown
      - unavailable
    id: down
  - platform: state
    entity_id:
      - event.bath_fan_config
    not_from:
      - unknown
      - unavailable
    id: config
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - up
        sequence:
          - choose:
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_up
                    attribute: event_type
                    state: multi_press_1
                sequence: []
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_up
                    attribute: event_type
                    state: multi_press_2
                sequence: []
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_up
                    attribute: event_type
                    state: multi_press_3
                sequence: []
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_up
                    attribute: event_type
                    state: multi_press_4
                sequence: []
      - conditions:
          - condition: trigger
            id:
              - down
        sequence:
          - choose:
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_down
                    attribute: event_type
                    state: multi_press_1
                sequence: []
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_down
                    attribute: event_type
                    state: multi_press_2
                sequence: []
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_down
                    attribute: event_type
                    state: multi_press_3
                sequence: []
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_down
                    attribute: event_type
                    state: multi_press_4
                sequence: []
      - conditions:
          - condition: trigger
            id:
              - config
        sequence:
          - choose:
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_config
                    attribute: event_type
                    state: multi_press_1
                sequence:
                  - action: light.toggle
                    metadata: {}
                    data: {}
                    target:
                      entity_id: light.master_bedroom_ceiling
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_config
                    attribute: event_type
                    state: multi_press_2
                sequence:
                  - action: fan.toggle
                    metadata: {}
                    data: {}
                    target:
                      entity_id: fan.master_bedroom_ceiling
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_config
                    attribute: event_type
                    state: multi_press_3
                sequence: []
              - conditions:
                  - condition: state
                    entity_id: event.bath_fan_config
                    attribute: event_type
                    state: multi_press_4
                sequence: []
mode: restart
4 Likes

Same issue for me-- nothing under device. I too found the events, but, at least for me, they are not eventing reliably. Have you been able to get any multi taps working in automations?

I haven’t yet. But it has gotten a bit sidetracked because the Adaptive Lighting integration has stopped working for me with Hue Light groups and I am working on fixing that first. I am also still trying to figure out how to conceptually do dimming and hook up the LED side bar with the current light value.

Thank you for this Francesc0! I do have a question for you though. How did you find the state value? I can’t seem to find “multi_press_3” or any of those states anywhere!

In the Automation GUI, click Add Condition, State, enter the event entity_id, under attribute select Event Type, and then the dropdown for to: and from: will display all the possible states.

The GUI will display them as Pressed once, Pressed twice, etc., however if you click the three dots and change it to YAML, you’ll see the actual states are multi_press_1, multi_press_2, etc…

Keep in mind you can’t actually use the attribute and state as a trigger, or you’ll end up with issues when consecutive taps of the same number. To get around this your trigger must only include the event entity_id, leaving the attribute blank, and then use a condition for the attribute: and to: fields.

1 Like

Great blueprint! Thank you so much for putting it together. I know it takes some work to put in all combos of 5 presses but it is greatly appreciated!

1 Like

great work! btw, it also picks up my other matter buttons (currently only my Switchbot Universal Remote)

Thank you! Glad to help.

Does it work with your Switchbot? I hadn’t thought of it, but I don’t think it would be too hard to turn this into a blueprint for all matter buttons.

At this point I have everything working perfectly except getting the “hold” button to dim or brighten my Hue lights. Some people are saying it might not be possible but I feel like it has to be.

Not exactly. Switchbot remote exposes 4 buttons and they only support single press. I was able to take control of your blueprint and modify it to work though! Much cleaner having one automation for the remote than 4 separate ones.

Try this as your action:

    upHeld:
      - repeat:
          sequence:
            - action: light.turn_on
              metadata: {}
              data:
                brightness_step: 25
              target:
                entity_id: light.<your_light>
            - delay:
                hours: 0
                minutes: 0
                seconds: 0
                milliseconds: 80
          while:
            - condition: state
              entity_id: event.<device_name_up>
              attribute: event_type
              state: long_press
              enabled: true
    downHeld:
      - repeat:
          sequence:
            - action: light.turn_on
              metadata: {}
              data:
                brightness_step: -25
              target:
                entity_id: light.<your_light>
            - delay:
                hours: 0
                minutes: 0
                seconds: 0
                milliseconds: 50
          while:
            - condition: state
              entity_id: event.<your_device_down>
              attribute: event_type
              state: long_press
              enabled: true

You can adjust the step and delay to adjust the dim speed. It’s not a smooth transition though.

I’m trying to tie dimming to the LED level on the switch. Do you know what we would need to get a smooth dimming? It works with things like sliders so I’m surprised it’s hard with these switches. I’m going to try out the blueprint today. Thanks!

This works for syncing the switch brightness to another light. There’s another gentleman working on a blueprint as we speak, but it needs a few more tweaks before it’s ready.

alias: sync test
description: ""
trigger:
  - platform: state
    entity_id: light.office_switch
  - platform: state
    entity_id: light.office_switch
    attribute: brightness
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: light.office_switch
            state: "on"
        sequence:
          - data:
              brightness: |
                {{ state_attr('light.office_switch', "brightness") }}
            action: light.turn_on
            target:
              entity_id: light.office_ceiling
      - conditions:
          - condition: state
            entity_id: light.office_switch
            state: "off"
        sequence:
          - data:
              entity_id: light.office_ceiling
            action: light.turn_off
    default:
      - target:
          entity_id: light.office_ceiling
        action: light.turn_on
        data: {}
mode: single

Is there a link to a repo or thread? I can probably contribute. Would this be a replacement for yours?

1 Like

Edit: I forked the blueprint and refactored the code a bit. Also added an option to set a min brightness. Lmk if you run into any issues.

I strongly recommend you set the on/off transition to 0 for both devices, if possible, and make sure they have a matching ‘On Level’.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

1 Like

Is the blueprint working as expected for you all?