What’s Running in Home Assistant? A Lovelace Card

If you’re a Home Assistant user, you know that automations can be an incredibly useful tool for automating tasks and making your smart home more efficient. But sometimes, things don’t go as smoothly as we’d like them to. Maybe a script gets stuck in a loop, or an automation doesn’t seem to be working the way it should. Today, we are going to look at a really useful card I have in my Home Assistant Dashboard. The Running Automations card!

This card, which you can add to your Home Assistant dashboard, gives you a real-time view of any automation that is currently active on your system. This is incredibly useful for troubleshooting and identifying problems with your automations, as well as for optimizing their performance.

So, how do you set up the Running Automations card? The first step is to install HACS (Home Assistant Community Store) and the Auto-Entities card. With these two tools in place, you are ready to create your Running Automations card.

So what logic are we using to create this dynamic view?

Automation running MODES make this possible. Introduced in July of 2020 (version 0.113), running modes added an attribute to automation and script entities called current. The current attribute is normally 0 when not running and then increments up for each instance of the automation running.

This allows us to create a very easy to understand filter in Auto-Entities that looks for any automation or script with an attribute of current not equal to zero and display it.

type: custom:auto-entities
card:
  show_header_toggle: false
  title: Running Automations
  type: entities
filter:
  include:
    - domain: automation
      attributes:
        current: '! 0'
    - domain: script
      attributes:
        current: '! 0'
show_empty: false
sort:
  method: last_triggered

This is a very easy and useful card to set up to see what is happening on your system real time.

Happy Automating!
Carlo

TAGS