Why does my LED matrix clock flicker every time Home Assistant pushes an update?

Oct 18, 2026 Last reply: 8 hours ago 5 Replies

First reply

kyates_1983

Your diagnosis is close but I'd flip it around a bit. The buffer itself isn't usally the problem in ESPHome, since the display component writes the whole frame out in one go. What's biting you is that the sensor updates are triggering a redraw of the entire display even when…

Read the full reply

So I finally got my little dot matrix clock working with an ESP32 and ESPHome, and the time and temperature both show up fine. The problem is that every couple of seconds when the sensor data comes in from Home Assistant, the whole display does this quick flicker before it redraws. It's fast but noticeable, especially at night in a dark room.



I'm using the full frame update in my config and I thought that would avoid this exact thing, but apparently I'm missing something. My guess is the display buffer gets cleared before the new values are written, so there's one refresh cycle where everything is blank. Does that sound right?



For what it matters, the clock itself keeps ticking smoothly between updates. It's only the moments when new data arrives. Would it be better to only push updates when the value actually changes, instead of on a timer? Right now the temperature sensor reports every few seconds even when the reading hasn't moved, so I wonder if that's flooding it.



Any hints on how you all handle this would be great, because the hardware side went way smoother than this did.


Your diagnosis is close but I'd flip it around a bit. The buffer itself isn't usally the problem in ESPHome, since the display component writes the whole frame out in one go. What's biting you is that the sensor updates are triggering a redraw of the entire display even when nothing changed, and with a lot of matrix drivers that full write cycle is just slow enough to catch a blank or half-written frame with your eyes. It shows up worst in a dark room because your pupils are wide open, so even a few milliseconds reads as a flash.

The easy first fix is exactly what you guessed: stop pushing updates when the value hasn't moved. In ESPHome you can put a delta filter on the temperture sensor so it only reports when the reading actually changes, or a throttle if you want to limit how often it reports at all. Room temp might sit at the same tenth of a degree for an hour, so right now you're redrawing for nothing every few seconds.

The other thing to check is how the update gets triggered. If your lambda or an automation is tied to on_value of the sensor, every report forces a repaint. Better pattern is to let the display component update on its own interval and just read the current sensor state inside the lambda. That way the clock redraws on a schedule you control, not whenever HA happens to cough up a packet. One more thing worth checking depending on your driver chip: some of them briefly touch the brightness register as part of an update, which looks like a flicker even with a perfect frame buffer. If the flicker survives the filter change, try logging what happens in the split second it occurs. I run a similar setup and after adding the delta filter the redraws basically vanished. Time ticks along, temp updates maybe once every ten minutes when the room actually shifts, and the display stays rock solid at night.

Had the same ghost on my matrix build last winter and it turned out not to be the sensor traffic at all. My auto brightness lambda was rewriting the intensity every loop, and that tiny register write showed up as a flash with the lights off. The thing that finally cracked it for me was just watching the serial log in a dark room, the brightness value jumped right before every blink. Once I made dimming only fire when the light level actually moved a full step, the flicker was gone. So if the reporting filter doesn't fix yours, check anything else in your config touching brightness on its own schedule.

Seconding the delta filter advice, that fixed the exact same flicker on my hallway matrix. I went one step further and moved the sensor reading out of the update cycle entirely, so my display lambda just grabs whatever the current value is on its own one second interval. Since the sensor and the screen stopped being chained togehter, even a real temperature change slides in without any blink. Also dropped the display interval itself from 500ms to a full second, the clock hand movement still looks fine to the eye and the panel runs cooler too.

If it still blinks after you seperate the sensor from the redraw, look at your update interval vs how long the full frame write actually takes. Mine kept flashing til I realized the interval was shorter than the write cycle, so the buffer got cleared mid-push. Stretched the interval out and it went quiet. Also check what your interval is set to during night mode, since a fast refresh you never notice in daylight is brutal after dark. Mine sits at 2 seconds now and the temp still looks fresh enugh.

Update: tried the delta filter on the temperature and that killed most of the flashing, so that was a big chunk of it. But there's still a tiny blink now and then, which makes me think the reply about the interval being shorter than the frame write is my remaining problem. How do you actually check how long the full write takes? I have no way to measure it.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required