Repository navigation
Description
Does the issue also happen in Safari?
Not applicable (native app feature)
The problem
Home Assistant periodically blocks the Mac from sleeping while it does database-background-access. It's supposed to release that block after it finishes, but I have found that frequently when I wake my Mac from sleep and then lock the screen shortly after, that Home Assistant will issue a PreventUserIdleSystemSleep for database-background-access and not release it until I unlock my screen. At which point it releases the assertion. This prevents the Mac from sleeping the entire time the screen is locked. I've seen it keep the lock for over 16 hours.
It doesn't do this all the time, but it is frequent enough that I see it daily. I attached a log from yesterday and today showing Home Assistant preventing preventing sleep and releasing it several times before it prevents sleeping at 2026-11-10 00:11:36 am and holds the assertion until I unlocked the screen at 08:40:14 am at which point it released the assertion.
Basically the bug is that Home Assistant is not releasing the sleep assertion while the display is off which is preventing the Mac from sleeping
Here's the relevant part of the pmset -g log logs:
home-assistant-sleep-log.txt
Which platform has the issue?
macOS
Which device model are you using?
M4 Mac Studio
Which OS version is the device running?
MacOS 27.2.1
What version of the app has the issue?
2026.10.3 (2026.3322)
What was the last working version of the app?
No response
What version of Home Assistant Core are you running?
2026.11.0
Steps to reproduce
- Run Home Assistant Companion.
- Lock screen.
- Unlock Mac some time later.
- Run
pmset -g logto check if Home Assistant has blocked sleeping.
Look for lines like:
2026-11-10 06:26:36 -0500 Assertions PID 701(runningboardd) Summary PreventUserIdleSystemSleep "app<application.io.robbie.HomeAssistant.136579355.136584940(501)>701-1437-36619:database-background-access(FinishTask)" 06:26:42 id:0x0x100008537 [System: PrevIdle]
2026-11-10 09:05:13 -0500 Assertions PID 701(runningboardd) Released PreventUserIdleSystemSleep "app<application.io.robbie.HomeAssistant.136579355.136584940(501)>701-1437-50388:database-background-access(FinishTask)" 00:09:07 id:0x0x100009715 [System: DeclUser kDisp]
Expected behavior
Home Assistant Companion should release the PreventUserIdleSystemSleep when it finishes the database-background-access task even if the screen is locked.
Did you upload your companion app logs through the form above?
Yes
Activity