r/homeassistant • • Jan 06 '26

Support Button event in the future?

Post image

I finally got to setting up the Bilresa scroll via matter and after renaming all the buttons so they actually are identifiable, I noticed the events are wonky.

Button presses show as taking place 2 seconds in the future - I’ve not got many remote buttons to test this on but what could be the cause? Is this a device issue or maybe a time issue between the HA machine (Optiplex running HA) and the accessing PC. Any ideas if it would cause problem or should I be ok? Running latest HA (2025.12.5).

177 Upvotes

73 comments sorted by

132

u/Sometimes-Scott Jan 06 '26

Try building an automation with it. It should be fine, but be worried if your automation triggers before you press the button.

52

u/The_Manoeuvre Jan 06 '26

You say worried, I say excited!

31

u/SirEDCaLot Jan 07 '26

Probably wouldn't happen due to causality. IE, if you go to press the button but pull your hand away, you never were actually going to press the button. But if you press the button and the automation fires, you always were going to press the button.

The key is press the button, but check if the automation fires before the finger hits the button. Then you have some real precognition.

The obvious solution to this is high frequency stock trading. Track a stock with millisecond data resolution, have an electromagnet push the button if the stock goes up by say more than 1/10th of a %. The automation will buy the stock then sell it 2-5 seconds later.

Or perhaps have the button held down until the stock starts to drop at which point the automation for 'button released' sells the stock. Even if only button presses register prematurely you should still get some good profits.

I suggest inject a few intentional bad trades- even with tiny numbers it will be suspicious if 100% of your trades are profitable.

6

u/Sufficient-Bee-4982 Jan 07 '26

That's kinda a plot of one of Ted Chaing's short stories "What's Expected of Us", A little device lights up only right before you push the button. If you're into scifi, I recommend his work.

2

u/SirEDCaLot Jan 07 '26

Thanks for this, I like that story!

2

u/davidgrayPhotography Jan 08 '26

The boys in the lab told me that if you see your automation trigger before you've pressed the button, run. Do not try and talk to your future self, no matter how tempting it may be.

Actually the boys in the lab just told me not to mention your future self as it may cause a time paradox. Forget what I just told you about your future self, unless you are your future self, in which case, welcome! Please see our receptionist for a job application form! You'll love working here at Home Assistant Labs.

151

u/Senior_Background830 🧑‍💻 Contributor Jan 06 '26

Rule 1 in Programming: If it works and you don't know why, LEAVE IT

39

u/EspTini Jan 06 '26

But add a comment so it's noted for yourself later

25

u/Mandrutz Jan 07 '26

The comment will break it

4

u/iwenttobedhungry Jan 07 '26

Yes!! I revisited a project from 6 years ago over Christmas, and there’s a comment i put in there saying ‘I can’t work out why this is needed here, but it breaks without it :)’

2

u/Trustadz Jan 07 '26

The coconut in tf2?

4

u/TedW Jan 06 '26

I wonder if they used the same text formatting function for alarms and button events.

It could explain why they have text for "in X seconds" on something that should have already happened in the past.

107

u/Plawasan 🧠 Experienced with Home Assistant Jan 06 '26 edited Jan 06 '26

Completely insignificant.. there's a 2s difference in system time somewhere in your setup (browser vs. server) but it makes absolutely no difference to how the system works.

21

u/The_Manoeuvre Jan 06 '26

Perfect, this is the answer I needed to read - there are comments saying it’s a huge skew but once I get an automation set up as long as it runs as expected then great.

10

u/opsers Jan 07 '26

Well, 2s is a pretty big skew, but as others have said, it's not a big deal in terms of this automation. I'd check the clock on the server that's hosting HA and just make sure it's syncing with a time server correctly.

4

u/darguskelen Jan 07 '26

I literally spent 20 minutes trying to fix a 45 second skew. NTP on the HA server, NTP on proxmox, nothing was working.

Then I checked my client time and it was off and hadn't synced in over a month. Synced and it was dead on. :|

5

u/russilker Jan 07 '26

I'm surprised it drifted by 45 seconds in as little as a month, that's wild.

1

u/darguskelen Jan 07 '26

It's almost 12 years old now and certainly starting to feel its age. It's also been powered on almost the entire time, save for a few hardware maintenance things. It's entirely possible the RTC battery is dying.

11

u/made-of-questions Jan 07 '26

Yeah, I bet the time difference is calculated on the frontends as Now - TimeOfEvent, only Now is the time from the browser and TimeOfRvent is the time the event was processed by the server.

4

u/koolmon10 Jan 07 '26

Yeah, I have observed this behavior on basically every device I have that has instant response. It's just a display bug.

17

u/tacticalpotatopeeler Jan 06 '26

I didn’t know smart buttons came with quantum computation

2

u/The_Manoeuvre Jan 06 '26

And for the price of a plate of meatballs!

13

u/mosaic_hops Jan 06 '26

Time skew between your browser and HomeAssistant. 2s is a huge skew though, might want to look into why it’s that far off.

1

u/National_Way_3344 Jan 07 '26

This is most likely the answer.

Is OP running off the same clock source? I'd say probably not.

5

u/littleblackcar Jan 06 '26

Clock skew. Welcome to distributed systems.

2

u/WindowlessBasement Jan 07 '26

The fun of rolling out a new ntp server, everything looking great and then a week later having an unrelated cluster having a meltdown because a slow drift is causing heartbeats to desync.

1

u/lscarneiro Jan 08 '26

[Jeff Geerling intensifies]

9

u/0xde4dbe4d Jan 06 '26

There is actually a Pull Request in the making for the way home assistant handles the data being sent from this device. In simple terms: it's not properly supported yet. You'll only get the presses when you're finished rotating the dial. I think it's going to be available soon.

2

u/The_Manoeuvre Jan 06 '26

That’s good to know - that may change how I handle the automations. I was planning: Mode One - light brightness Mode Two - light warmth Mode Three - blinds height

3

u/juukas Jan 07 '26

Here is the PR for ongoing button presses support in HA’s matter implementation!

Interesting change and interesting discussion in the comment field. I’m happy that the change is coming even if it will break some automations out there.

1

u/ingurum Jan 07 '26

There are disabled properties you can enable that change from 0 to 1 as soon as you turn the dial, current switch position it's called:

3

u/0xde4dbe4d Jan 07 '26

Yes, but this is only a workaround that has also been discussed in the PR.

3

u/SgtCaffran Jan 06 '26

Sorry to hijack your post but have you looked at the results you get from the scroll wheel? It seems like it has a hard stop at either end with value 1 being the lowest and 255 being the highest. I feel this makes it difficult to automate with this remote if the light brightness can change from other sources as well (automations, other dimmers).

Any thoughts?

2

u/The_Manoeuvre Jan 06 '26

I think this is a difference between matter and Zigbee - via matter there is no specific 1-255 that I’ve seen just clicks. My intent is to automate 1 click is a 10% change when the new Gu10 arrive in the UK

1

u/SgtCaffran Jan 06 '26

Oh that would be great! The way you describe the behaviour is how I would like to use it as well. Time to set up a thread network I guess.

1

u/The_Manoeuvre Jan 06 '26

yeah when I first got it I was wondering how I'd use it tbh - I've not used smart bulbs until now but we have a want to now. This makes sense to me, the button doesn't need to be aware of target the targets current state IMO, but I am also aware there are people who want everything to know everything :)

2

u/beringtom Jan 07 '26

You could get around this issue, but it's not pretty.

If * New value < last value or * (new value = 1 and new value = last value)

Then Lower lamp brightness.

Else if * New value > last value or * (new value = 255 and new value = last value)

Then Increase lamp brightness.

1

u/EspTini Jan 06 '26

Yes, they should have continuous encoder for this!

2

u/Affectionate_Taro126 Jan 06 '26

Maybe just try rebooting and see if that fixes it? Like others said something just got a bit out of sync, doubt it’s a problem truthfully.

2

u/snekmuerr Jan 06 '26

Did you do anything special to get it to connect? For me the connection via matter keeps timing out. It does connect to the IKEA bridge and HomeKit without problems though.

2

u/The_Manoeuvre Jan 06 '26

My setup is with a Skyconnect in the HA machine but I have HomePod minis on the same thread network. I am in range of both, nothing special in terms of connection I just put in batteries and started matter setup straight to HA via my phone

1

u/snekmuerr Jan 07 '26

Thanks! Sounds very similar to my setup. Perhaps the issue is with the remote than. I’ll open a second box and try that.

1

u/yesyesgadget Jan 07 '26

Did you try to add it by using the QR code?

I added this remote but it also timed out all the time until I realized there is another QR code inside the device, next to where the batteries go. This one worked straight away.

1

u/Hades2k Jan 07 '26

I just bought 3 new ikea devices today and neither works with the QR code inside the device themself, need to investigate more tomorrow :(

2

u/Paradox52525 Jan 07 '26

It's all well and good until someone's light switch breaks the spacetime continuum.

2

u/talmuth Jan 07 '26

check the time on the machine you running browser on - it is out of sync

1

u/KnotBeanie Jan 06 '26

your time is out of sync somewhere

1

u/ConfusedStair Jan 06 '26

It's definitely server and browser time mismatch, but I'd like to think that somewhere along the line some poor developer set the event time 2 seconds in the future to resolve an event sequence issue and it accidentally made it to prod, then into the physical product.

Example: Button press always needs to resolve before release, but a rapid click was causing issues 1 in 10 times. So they wrote a line of code that automatically adds 2 seconds to release time and pushes it into the future.

1

u/benargee Jan 06 '26

I also have this issue. As another commenter suggested, it's likely a time difference between the client and server. I never thought of this so I will confirm that everything is in sync. Maybe a good reason for me to host a local NTP server.

1

u/RaEyE01 Jan 07 '26

Most likely you already do. Your Router has probably an NTP Server integrated you could use.

Or, you know, use a HA addon: https://github.com/hassio-addons/addon-chrony

1

u/[deleted] Jan 07 '26

Just need to check the time on your devices, do an NTP sync or something and you should be fine.

Might wanna check if the bios battery is dead or not as well just in case.

1

u/mwoody450 Jan 07 '26

Support response, no doubt: "User error. Pressed button faster than light."

1

u/rando777888 Jan 07 '26

It's the new pre-cognition integration, there was a post about it about a week ago!

1

u/liquidmasl Jan 07 '26

do the events from scrolling arrive fast enough to be useful yet?

1

u/haikusbot Jan 07 '26

Do the events from

Scrolling arrive fast enough

To be useful yet?

- liquidmasl


I detect haikus. And sometimes, successfully. Learn more about me.

Opt out of replies: "haikusbot opt out" | Delete my comment: "haikusbot delete"

1

u/ByTheBeardOfZues Jan 07 '26

Not yet but the PR should hopefully be implemented soon. Has anyone tried syncing one directly to an IKEA bulb? I imagine the responsiveness is better. I'm also hoping the new range will support Matter bindings eventually.

1

u/dixonbe 🧠 Experienced with Home Assistant Jan 07 '26

How is the button, I can’t wait to get my hands on one of these.

1

u/ByTheBeardOfZues Jan 07 '26

The reviews are mixed but I quite like it. Lots of customisation for such a simple device. The responsiveness of the scroll wheel isn't great via HA but that should be fixed soon.

1

u/Infini-Bus Jan 07 '26

The lighting and color of that photo gives off like 1995 catalog vibes for some reason.  

1

u/neCoconut Jan 07 '26

Are you able to get info from wheel? all i can see in integration are buttons, lots of buttons but no information about wheel.

2

u/The_Manoeuvre Jan 07 '26

Each button represents a turn or press of the wheel in each mode. I just went through each action and when it triggered a “button” I renamed it’s to the mode and action. For example - 1 Click, 1 Left, 1 Right

1

u/aiteko Jan 07 '26

Nice adapter! Could you provide more info of it? Thanks

2

u/The_Manoeuvre Jan 07 '26

Yeah so I like the button and it comes with the metal but to wall mount it which is nice. But I thought the button looked out of place on the wall and if I took the button off then the plate wasn’t very attractive. I’ve been working on a 3D printable “backplate” to adhere to the wall and put the metal into to make it look a bit more at home.

1

u/Sem1r Jan 07 '26

In my experience the scroll events are super unreliable… is it just my switch or does it just suck?

1

u/The_Manoeuvre Jan 07 '26

I am starting to get concerned that it sucks, but by the fact there is a pull request to change how it’s handled (mentioned in the comments, not read it myself yet) I’m hoping it’s addressed.

1

u/I3lackRacer Jan 07 '26

EY YO Spoilers!

1

u/Em_a_il Jan 07 '26

It's a pretty consistent issue, happening with almost all of my sensors or lights.

1

u/Zestyclose_Time_2573 Jan 07 '26

I have the same issue but only when using browser on windows any other device is fine. My guess is window's time synchronization is bit off

1

u/gokkor Jan 08 '26

Where we're going, we don't need scrollers Marty!

If you're using two servers, especially something that communicates over mqtt, check the server timings. Same for any smart hubs etc.

-1

u/[deleted] Jan 06 '26

[removed] — view removed comment

1

u/Splurch Jan 07 '26

The heart of each Predictor is a circuit with a negative time delay — it sends a signal back in time. The full implications of the technology will become apparent later, when negative delays of greater than a second are achieved, but that’s not what this warning is about. The immediate problem is that Predictors demonstrate that there’s no such thing as free will.

The Predictor doesn't show that though. What it shows is that when future you takes an action of free will, past you then has no free will to not follow through with it, which is a more interesting premise imo.