Automation to turn on a light when I'm out of bed

I’m hoping to set up an automation which will turn on my living room lights each morning. I could easily set up a schedule so they turn on at the same time every morning, but there are weekdays where ! work from home and therefore wake up later than usual.

What I’d like to do is to only switch the lights on when I get out of bed. I’m wondering, since my alarm is on my phone, if I could make use of the Velocity value from my device tracker to trigger the change. So perhaps it would be:

If after 4:45 am & velocity changes from 0 to > 0 then turn on lights.

Is this a logical way to go about it or is there a better method of setting this up?

1 Like

Not sure how reliable that would be.

You’d probably be better off installing Tasker or Macrodroid and triggering your automation that way.
You could set up either of the above apps to send a signal ( HTTP GET / MQTT ) to Home Assistant when your alarm goes off.

That’s a good thought. I should have mentioned I’m on iOS. Are there any equivalents you know? I’m digging around myself right now.

I always charge my phone on a stand overnight, so I am officially up when the phone stops charging. It gets triggered to an input boolean on HA, but its all android so not much use to you.

I do know I can get battery state from my built in device tracker, but it was unreliable (would stay as “plugged in” until I manually pushed an update) which is one of the reasons I switched to using Owntracks and cloud-MQTT for location monitoring.

But this is a good point. My phone is always plugged in on my nightstand. If I can find a more reliable way to get the plugged/unplugged state I could set it up that way.

If you show me an iPhone or Windows computer you’ll be greeted with the same blank stare.
My apologies :wink:

1 Like