#Issues getting automations work with Bilresa buttons

1 messages · Page 1 of 1 (latest)

vapid plaza
#

Hey all,

I'm trying to make a simple automation involving the Bilresa Dual Button and a Kajplats bulb, with the following configuration:

description: ""
triggers:
  - trigger: state
    entity_id:
      - event.bilresa_dual_button_button_1
    attribute: event_type
    to:
      - multi_press_1
conditions: []
actions:
  - action: light.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: light.kajplats_e27_ws_g95_clear_806lm
mode: single```

The issue is that the automation only *sometimes* work, i.e. I can press the button (once) several times in a row and it will only trigger after multiple "Pressed once"-presses.

I can even follow along on the device page and see the button correctly showing "Pressed once" every time I press, but nothing happens, until that 1/10-chance that it does work, so it's not that it doesn't register the click, as also seen from the activity page in the image attached below (Even though I can't get it to show the actual event text in the log, they *are* pressed once events)

I also got into Developer tools and see them pop up by listening to state_changed events, though that's a bit spammy so hard to isolate only to the Bilresa.

Just to get the obvious hardware/software things out of the way:
```OS: HAOS 16.3 (x86_64)
Core: 2026.1.0
Home Assistant: 2026.1.0
Supervisor: 2026.01.0
Thread Radio: ZBT-2

Might be worth mentioning, even though unrelated to the automation, that I previously used one of the PoE Thread radios, with a couple of Matter-over-Thread devices, that started becoming unstable as I added more of the new IKEA devices. As a result I ordered a ZBT-2 which I migrated to before adding more IKEA devices, resolving the issues I were having up to that point. (Issues pairing, and also devices being "laggy")

So with all that out of the way, do any of you have any ideas on what I could try next to debug/troubleshoot this issue? I'm relatively technical and not new to HA, not used automations a lot but I'm about to change that

#

(I did see the other post on the Bilresa and automations, but figured I should create my own thread instead of going into that thread, apologies in advance if I shouldn't have)

icy jewel
#

because of how event entities work, doing a single press multiple times in a row will cause the "state" to change, but the event type "attribute" will stay the same

#

so you need to make sure that you trigger based on the state changing, and then check the event type afterwards (either on the trigger variable via a template, or by checking the attribute on the entity)

vapid plaza
#

Oh my gosh, that's exactly what they did in the other thread 😳 and that was it, guess I should've read better 😅

#

So just for the sake of everyone else, here's how it should look:

#
description: ""
triggers:
  - trigger: state
    entity_id:
      - event.bilresa_dual_button_button_1
conditions:
  - condition: state
    entity_id: event.bilresa_dual_button_button_1
    state:
      - multi_press_1
    attribute: event_type
actions:
  - action: light.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: light.kajplats_e27_ws_g95_clear_806lm
mode: single
hybrid drift
#

Unfortunately HA still has no nice trigger to handle an event-entity all at once. Still hoping it will come. For now, you probably also want to not trigger on from/to unavailable. So you can make it:

alias: Turn on light
description: ""
triggers:
  - trigger: state
    entity_id:
      - event.bilresa_dual_button_button_1
    not_from:
      - unavailable
      - unknown
    not_to:
      - unavailable
      - unknown
conditions:
  - condition: state
    entity_id: event.bilresa_dual_button_button_1
    state:
      - multi_press_1
    attribute: event_type
actions:
  - action: light.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: light.kajplats_e27_ws_g95_clear_806lm
mode: single

And unfortunately, also the not_from and not_to are still not in the UI...

brittle gate
#

I'm so glad I found this! I bought some Bilresa switches a couple of days and have been going crazy trying to work out why my automations weren't working when I could clearly see that HA was detecting the button presses.

I can understand what has been said as to why this is happening and will need to update my automations accordingly. However, I have a single "Choose" automation for each Bilresa device so I am a little confused as to where things need to go. I've attached the YAML for my existing automation which works fine as long as I do a different button press to the previous one.

Can anybody give me some guidance on what needs updating in the YAML to make this work please?

hybrid drift
brittle gate
# hybrid drift <@908562197175763016> https://pastebin.com/j43qagnH

Thank you!!! I have just updated my automation with your code and it is working perfectly!!! I was almost on the right track with fixing it myself based on the original code you posted but I don't think I would have worked it out completely without your help.

This is for my wife's bedside. I have another one for my bedside but the lights are reversed. I will definitely be able to sort that out myself.

I hope that HA eventually supports this kind of setup in the Visual Editor as I am sure IKEA is going to sell a heap of these things.

Thank you again. I really appreciate your help with this!

hybrid drift
#

No problem 🙂

And yeah, this showcases two major shortcomings to the UI automations. Both the crappy event-entity support and the fact not_from and not_to are still not in the UI (even though I would say they can be a 1:1 copy of the state selector).

brittle gate
#

Hopefully that changes soon.

I just updated the automation for my device and it is also working fine. Now I just need to come up with ideas for the double press and hold press for button 2 on both switches but I will be fine to add those.

The other GREAT thing is I just explained the functionality to my wife and the WAF is high!!!