i kept falling asleep on the couch with my oled tv on and my lights blazing. so i built something about it.
sleepd is a home assistant integration that tracks your sleep state in real time via mqtt and exposes it as actual sensors you can automate against. my personal setup:
- falls asleep in bed → lights off, tv off, alarm set for morning
- falls asleep on the couch → phone alarm fires to go get in bed (i have a pressure sensor in my bed so it knows i’m not there)
it works with sleep as android out of the box and anything else that publishes sleep events over mqtt. you get wake status, sleep stages, alarm controls, sound detection, lullaby and disturbance events — all as native HA entities.
installable via hacs: GitHub - sudoxreboot/sleepd: sleep/wake detection IN REAL TIME for home assistant
built it for myself but figured other people probably have the same problem. happy to help anyone get it set up.
this integration used to be SAAS - Sleep As Android Status.