|
|
|
|
|
by francis-io
1593 days ago
|
|
Home Assistant has home zones. You can trigger events based on being home, away, or the trigger between both states. My current favorite automation is to turn off my lights when I go to sleep by plugging my phone in to charge. The basic logic is: * IF it's 1AM
OR
I transition from Away to Home
OR
My mobile starts charging
CONDITIONAL
My location is AWAY
OR
the time is between 21:00 and 03:00
THEN
Turn my office, kitchen and bedroom lights off * It's a bit complex to get your head around, but the basic idea is, my lights turn off at 1 AM, or I leave the house, or my phone starts charging after 9 PM. This allows me to go to bed early (I'm a night owl) by just charging my phone. It wont trigger in the day based on the conditional. |
|
I combine those and a few other things into a hybrid Boolean sensor called “sleep conditions”
At any point in time the “sleep conditions” sensor is calculated as “true” or “false” - ie. does it look like I’m likely to be going to sleep.
So when my phone is placed on charge AND sleep conditions = true, my automation goes into sleep mode triggering lights off, setting wake up alarm etc
It seems trivial, but simply putting your phone on a wireless charger at night and having everything react automatically is quite gratifying!