Home Assistant Automations - Share Your Best Ones

We all have creative little gems hidden away making our lives run as smooth as possible, post your finest works here!!

To start the thread off I thought this was a worthy candidate.

To keep my phones battery health in prime condition I have been keeping the battery below 80% as much as possible but recently hard wired a solution.

I have my iPhone run a shortcut when its battery reaches 80% which in turn updates its sensor values in HASS. HASS has an automation to turn off my bedside phone charger if my phone goes above 79% and turns back on when it falls below 70%. So now when I wake up my phone battery will always be 70% or above. No more starting the day with 21% battery!

All this effort has paid off though. My phone is 2 years old and still has 91% battery capacity

5 Likes

Right now I have automations for my home exterior lighting and also my heating pads and grow lights for my indoor nursery for my plant starts.

I don’t have air conditioning, and it’s not really necessary because of the mild weather in the PNW, but some afternoons it gets toasty (especially if the oven is running) so I would find myself checking the outdoor temps a lot.

So, I set up an automation that compares the temperature inside and outside, and sends me a text when it’s time to open the windows and cool the place down. Won’t work for all climates but it saved me money (compared to owning and operating an ac unit).

2 Likes

Not sure if it’s a β€œbest” one, but I have an automation running on the 1st day of each month to reset EnergyTotal counters on my Tasmota smart plugs. That way I can look up how much energy each device uses each month.

3 Likes

I also live in the PNW. When we had the record heat 2 years ago, my mini-splits came in clutch.

1 Like

I use it to play a doorbell sound on my sonos speakers when a unifi doorbell is pressed. It is actually better functionally than the unifi chimes.

3 Likes

my newest automation is simple, using Shelly 1 Mini Gen3 (smart relay) device which is mounted behind a light bulb #1 in the toilet. There are 2 bulbs - one produces a lot of light and the second bulb produces a small amount of light - which is enough at night.


                                                             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” 
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚           β”‚ 
       β”‚              β”‚                  β”‚ Shelly 1    β”‚     β”‚ LIGHT     β”‚ 
  ──────              β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€ Mini (Gen 3)β”œβ”€β”€β”€β”€β”€β”€  BULB 1   β”‚ 
       β”‚  common      β”‚           β”‚      β”‚             β”‚     β”‚           β”‚ 
 AC    β”‚  switch      β”œβ”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€(smart relay)β”œβ”€β”€β”€β”€β”€β”€           β”‚ 
~230 V β”‚  on the      β”‚       β”‚   β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚ 100%      β”‚ 
       β”‚  wall        β”‚       β”‚   β”‚                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 
  ──────  (ON/OFF)    β”‚       β”‚   β”‚                                        
       β”‚              β”‚       β”‚   β”‚                                        
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚   β”‚                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” 
           β–²                  β”‚   β”‚                          β”‚           β”‚ 
           β”‚                  β”‚   β”‚                          β”‚  LIGHT    β”‚ 
           β”‚                  β”‚   └───────────────────────────   BULB 2  β”‚ 
           β”‚                  β”‚                              β”‚           β”‚ 
     user can turn light      └───────────────────────────────   5%      β”‚ 
         ON or OFF                                           β”‚           β”‚ 
                                                             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 

Shelly 1 relay will turn the β€œday” lightbulb ON only during day time (6:00 - 20:00).

When you turn the light on at night (for example at 20:30) only light bulb #2 will be on :slight_smile:

Great about Shelly relay is local scripting. It can work without Home Assistant. So it’s still working independent on some central point of failure (Home Assistant or Node-RED or another home automation solution).

As you may have noticed, my Shelly is not powered on most of the time. Only when I switch on the light using the wall switch - at that moment Shelly quickly boots up and within 3 seconds it connects to Wi-Fi and gets the current time from my NTP server on my Mikrotik router and based on the current time the simple logic in Javascript decides whether to activate or deactivate the relay (light bulb).
Also Shelly can remember last state, immediately after boot it activates last state. So only once between day and night it really needs adjust it’s state based on logic in local script.

2 Likes

Ive got a few that have made my life much easier

-grow lights for plant starts turn on and off with the sunrise/set

-closure sensors on fridges and freezers send warnings to phones and eventually if not addressed to the home theater in the form of a sound recording of my partner yelling about the freezer. (Her biggest nightmare is losing a whole chest freezer of food due to defrost)

-automation that checks the brightness outside/sun height when you turn on a light and adjusts its brightness and tone accordingly. No one likes bright white at 2 in the morning.

2 Likes