What Is Your Most Useful Automation?

My most useful automation are the one that control my domestic heat water preparation and control my furnace as this is the highest expense in my household. In my case gas heating is the biggest expense.
For now it saved me a lot of money on gas usage.
But on the other hand I did changed gasket on all my doors and windows, that also helped a lot. And I did installed smart trvs so that I can do zone heating per room.
When I looked on it, it’s not just one automation but bunch of them I set up with one goal in mind, to reduce my heating bill while keeping my comfort.

I absolutely love the EPG stuff I have written.

The wife has not grown to enjoy it yet. But, I use it multiple times a day.

What is this?

Electronic Programming Guide, at a guess.

hmmm, yeah ok. Shame @jeffcrum didn’t elaborate on what exactly is so great about this “stuff he has written”… in the same way others in this thread explain their “most useful automations”.

Oh, sorry. There is a long post about it already.

2 Likes

My wife and I both love the pauses the TV, when either of our phones ring. Saves scrabbling for the the remote, for me any of the dozens that I forget are there, because they just work.

1 Like

Ok, our most useful is the most simple. We walk into the pantry closet, the light turns on, walk out, around 30 seconds later, it turns off. You don’t realize how useful it is until you walk in with both arms full of groceries… Gotta love it!

I feel the same way about all my auto lights, but recently I used my garage camera as a motion sensor to turn on a new light I installed that makes a dark garage look like it’s in broad daylight in the middle of the Mohave and it’s great because that’s where my deep freeze is and, like you, having an arm full of stuff for the freezer makes this a very nice automation.

But, honestly, all my automations are useful and the most useful changes on a week to week basis. I have some pretty crazy ones that were complicated to build but provide so much utility and even the humble “turn a light on when there’s motion” is handy every single day.

Lock Sliding Doors at night, unlock in the morning - more of a hardware solution though - Sonoff 12dcv Wifi Switch ($4) + a LOX Magnetic Lock. ($100). Automation piece of mind.

Heat Water when the Electricity General Rate Forecasted Price for a 3 hour (time it takes to heat our water tank) time period (= 6 forecasted windows/6, [1]+[2]+etc) is the lowest, which usually coincides with the most PV. So if sunny, no cost, if rainy, it’s very cheap. Set and forget.

1 Like

(a little late for a reply… but)

I only set my motion sensors to trigger in Away and Vacation modes. My contact sensors will only trip in home mode if no one is in that room (using presence from various motion sensors and recently added human presence sensors). So, if I’m in my office, then the living room sensors will only be tripped if someone opens a door or window and no one is in that room. That way, I can have the alarm set for Home mode, but still be able to open windows and doors. When I leave a room, the alarm is still set, but ignores the already opened sensors (by using From…To in the automations).

lots of good ideas I will have to implement.
I have a few that are pretty useful:

  • Internet modem reboot on a timer because you obviously lose internet connection when remote
  • Tags, tags and tags. Z wave door locks with an nfc tag at each so it can unlock the door just by swiping.
  • Tag by the garage door to toggle the liftmaster bridge/garage door
  • Automation to turn on a foyer light when unlocking/opening the front door. kitchen counter lights when opening the kitchen door from the garage
  • Automation for when unlocking a door (while away) to then receive a text that the particular door was unlocked.
  • Pentair integration to turn pool lights on, slide water, and purge filter
  • Pentair pool system control, including water fill every night for 15 minutes and emergency text if fill is left on for more than 30 minutes
  • I have a Seco-larm photoelectric beam sensor hard wired to a door sensor that texts me with twilio when the beam something breaks the beam. I have it on my long drive way so that I get a text when someone is coming before they get to my front door
  • Water leak sensor on water pressure pump and turns Flo Moen water valve off if theres a leak
  • Power control based on time of day for water pressure pump to be turned off at 11pm and back on at 7 am
  • Z wave Multi sensor with light sensor. Light sensor is covering a house backup battery system to indicate once the battery has depleted to 40% capacity and texts me
  • Another light sensor on if the house is running off of the backup battery and text me. This could also be used on a laundry machine/ dryer to indicate when the cycle is done
  • EV Charger shut off if house is running on backup battery
  • Battery level notification to notify me every day at 5pm IF any battery is below 30% in my door locks, door sensor, water leak sensor, even cell phone and electric vehicles if I want.
  • Geolocation on phones of family members so that when they are on the way home it will text me. Helpful since cell phone signal is not good on the road leading to my house
  • Away occupancy for second home so that lights come on inside to make it look like someone is there.
  • multi tap on light switches to perform different device control like 3 times down on the master bedroom light turns all lights off, locks all doors, and closes the garage door if its open. or 2 presses up on the kitchen light switch will open the garage door.
  • timed lights on for hallway so when the kids turn the light on and go into their rooms and forget to turn the hall light off, it turns off after 3 minutes

Im looking to configure the Homeseer light switches to display rgb leds to indicate if garage door is open or door lock is unlocked so I dont have to even open the app on my phone. I had it configured when I ran HS3/4 but havent figured it out with HA. If anyone has suggestions on how to do this would be great.

1 Like

Does your phone read NFC tags without having to unlock it?

no, guess thats design. imagine so someone cant just take you phone and use the tags programmed.

I’ve been through several iterations of this and have landed on one that I really like that works perfectly every time. I had started with “if the internet is out for 5 minutes then toggle the power for 30 seconds and toggle it back”. The problem is that on really long outages I was constantly powering my modem off and on and sometimes that by itself was the problem. What I do now is this:

  • Internet goes down for 5 minutes
  • Power cycle the modem
  • Increment a helper entity that serves as a counter
  • Continue doing this 5 times (or 25 minutes of power cycling)
  • If still down, at cycle 5, now use 15 minute cycles (the original automation won’t fire past the helper being 5 cycles)
  • If still down after 8 15 minute cycles (2 hours more), switch to 30 minute cycles
  • If still down after 4 30 minute cycles (4 hours more), switch to 1 hour cycles until it comes back up
  • When it comes up reset the helper back to 0
  • At each iteration, including initial off and initial on, create a persistent notification so I am aware of what is going on
  • Create recorder entries for every part of this so I can give it to the cable company and say “this is how long you were down”
3 Likes

This is interesting. Is this internet reset / counter / notification / recorder automation yaml available somewhere in this forum or on github…?

1 Like

No, I wrote it but could probably post it here, just some automations, some helpers and some template sensors.

1 Like

Good point about extended outages. I havent actually automated it or even used it other than to trouble shoot over the phone when customer service tells me to unplug for at least 10 seconds.

Here’s how I do it:

Automation for every 5 minutes (adjust this for your 15/30/60 minute restarts as needed):

alias: "Action: Restart Internet Every 5 Minutes"
description: >-
  This is the result of the internet being down and starting the process of
  rebooting the modem every 5 minutes for the first 30 minutes (count 6)
trigger:
  - platform: time_pattern
    minutes: /5
condition:
  - condition: and
    conditions:
      - condition: numeric_state
        entity_id: input_number.internet_reset_count
        above: 0
        below: 7
      - condition: not
        conditions:
          - condition: state
            entity_id: binary_sensor.internet
            state: "on"
action:
  - service: persistent_notification.create
    data:
      message: >-
        The Internet router has been rebooted in response to the Internet being
        down
      title: Router Reboot (5 Minute)
      notification_id: routerrestart
  - service: script.internet_down
    data: {}
mode: single

That part creates a notification in addition to restarting via the script. I mention this because I use ID’s so I don’t get dozens of notifications, it just updates the one so I know when last it ran.

Then my script (you could put this directly in the automation itself, I just did it here because when I re-use something I try to use a script so I don’t have multiple places to update things). I have an automation that runs when the internet has been down for 5 minutes that increments the helper the first time, that then allows these to fire on their schedules afterwards:

internet_down:
  alias: Internet Down Restart Network
  icon: mdi:web
  sequence:
    - service: input_number.increment
      data: {}
      target:
        entity_id: input_number.internet_reset_count

    - service: homeassistant.turn_off
      data: {}
      target:
        entity_id: switch.aeon_labs_dsc11_smart_strip_switch

    - delay: 00:00:30

    - service: homeassistant.turn_on
      data: {}
      target:
        entity_id: switch.aeon_labs_dsc11_smart_strip_switch

Other than that it’s just having the helper entity in place for the counter. I also have a button on my dashboard to run the script manually because more often than not I notice the outage long before the 5 minutes the automation is waiting for and start the process by hand, the automation is more for when I’m not home (I’m in my RV a lot in the summer) so it takes care of it.

Speaking of RV or being away in general, I not only have a thread about my RV you can find on here but I also have a backup DSL line on a failover switch that kicks in if the cable is down so I’m still online, as well as having a laptop running while I’m gone that has a wired connection to cable and a wired connection to the DSL network and then a wireless to a cheap cellular hotspot on a very small plan so I can always take control of that laptop remotely if all hell breaks loose and diagnose anything. I also have several Shelly and Kauf ESP plugs where I can connect to their internal access points to force power cycling of critical systems, like if HA got locked up (which has happened a few times) or the firewall is in a bizarre state, both have programming to power their outlet back on after 1 minute in case the act of turning them off kicks me out of my remote access for any reason.

One area this gets used a LOT is at night when I’m sleeping. The internet will go down and this system just takes care of it and it’s usually fine when I get up. I see the notifications probably once every couple of weeks that it was out for an hour or two in the middle of the night as they did maintenance at the C.O.

1 Like

I just created another really cool automation, most certainly my favorite of all time so far. I’m beginning a top-down re-do of my entire HA to optimize it and make it actually smarter. In that I created a new system for controlling all my curtains and shades (aka covers).

What I had been doing up to now is setting each shade to some percentage based on what was happening. For example, when waking up then my scripts and automations had long sequences of “cover.open_cover” for a dozen covers. The same with many other things like going to bed or ramping down for the evening while watching TV, so on. I have a LOT of things that control my covers.

The problem with this is it is a huge pain to maintain as I come up with new “events” for which my covers are impacted I have all sorts of places to fix this up. Also as I add more and more covers to my house, again I have to touch dozens of automations and scripts. This was also slow, it often took several minutes to control multiple shades as each event fired and completed before the next event.

The new system is really cool. It starts with a sensor template, in which I have attributes for each cover in the house, each attribute is a DICT of settings of how to control each shade under certain “events” (wake up, go to bed) and then exceptions for each “condition” (climate changes, vacation mode, etc). Each attribute looks like this:

      #############################################
      # SIDE CURTAINS
      #############################################
      curtains_side: >-
        {{
          {
            'adaptive_cover_entity': 'vertical_toggle_control_side_sliding_glass_door',
            'adaptive_cover_insun_entity': 'horizontal_sun_infront_side_shade',
            'events': {
              'awake': {
                'value': 100
              },
              'evening': {
                'value': 50,
              },
              'sleeping': {
                'value': 0,
                'conditions': {
                  'swamp': 30,
                },
              },
              'shower': {
                'value': 0,
                'conditions': {
                  'swamp': 30,
                },
              },
              'shower_done': {
                'value': 100,
              },
              'end_mitigation_parity': {
                'value': 100,
              },
            }
          }
        }}

Then I have a script to control each shade based on these parameters. It first looks to see if the entity name is in the attributes of the sensor, if so then it looks to see if there is an event configured for the one being processed (i.e., awake), then sets the percentage to set the cover to the “value”. If it finds “conditions” within the event, it evaluates those conditions to see if there is an exception (i.e., if my swamp cooler is on and I need to leave the shade open slightly for venting). The result is the percentage that the cover should be at by the end of this run. You’ll see this in my side curtains posted above, the curtain set to 0 (close) when we shower, but if the swamp cooler is on it instead only closes to 30%. This script is set to run in parallel so that when fired on a house-wide scale it opens almost all covers simultaneously (rather than one-by-one).

This script also knows when to end mitigation (when I button the house up on really warm days), when to enable/disable adaptive covers to automatically adjust the cover to the point of letting too much direct sunlight into the room and more.

Finally a second script serves as a master script, it simply takes an event as a field (i.e., Waking Up that translates to “awake”), then runs through every single cover and sets it to the matching event value (with conditions) - it then takes the entity ID of a found cover and sends it to the first script to set the percentage of the cover.

Now the only thing I ever have to do is edit the sensor template to set all the ways I want a cover to be set based on events and conditions, no more editing dozens of automations or scripts, that one single sensor enables all automation to just always work.

Truly this is not only significantly smarter than dozens of automations, it also allowed me to remove a lot of automation and script sequences and the cherry on top is that controlling every cover in the house went from several minutes to about 45 seconds.

5 Likes