Can you dynamically display all automations in a view? (Lovelace)

Is there any way to dynamically display all automations in a view when using Lovelace? I want to be able to view and execute my automations if one of them doesn’t trigger for some reason, but I can’t figure out how to dynamically display all of my automations in a view now that I’ve upgraded to Lovelace.

Pre-Lovelace this was super easy, all I had to do was have this in my groups.yaml file:

automations:
  name: Automations
  view: yes
  icon: mdi:autorenew
  entities:
    - group.all_automations

Is there an equivalent in Lovelace?

Almost in the same way:

  • title: Auto
    panel: true
    cards:
    • type: entities
      entities:
      • group.all_automations

the just tap the grips to see all automations

I’ve tried that, and although it brings up a list of all your automations, you can’t execute them individually.

I just tried the following (which you can put in a view by itself) that I think will solve your needs, but it requires custom monster card.

  - type: custom:monster-card
    card:
      type: entities
      title: Monster Automations
    filter:
      include:
        - domain: automation
1 Like

I saw some posts about the monster card earlier and was going to give it a try if need be, but I was hoping that there was an easy way to do this within HA that didn’t involve having to add custom cards, but it doesn’t appear so.

That said, I’ve now attempted and am about ready to give up on trying to implement the monster card, lol. It doesn’t seem like the installation instructions have been updated to show what to do if you’re using 0.86.0+ (where Lovelace is default). I can’t load the JS in ui-lovelace.yaml because the file no longer exists. It says to save the JS in config/www but I don’t have a www directory in config, most examples I see show the file being in the /local/ folder, and then I’m not even sure where to put the actual code that shows the card now.

The combination of being new to Lovelace, upgrading to the newest version that doesn’t seem to be what most add-on instructions are written for, and not being able to find any concrete examples of how to implement things with the new version that uses Lovelace by default, and there are just too many variables that I can’t seem to get lined up properly.

So, instead of getting frustrated I’m just going to live without the dynamic lists of scripts and automations for now, and I’ll revisit this down the road.

Yes a bit tricky…when

/local/<filename or directoryname>

is used in a config, it gets translated to

<home assistant config directory>/www/<filename or directoryname>

I long ago created a www directory but more recently created a directory under it for custom lovelace
~/.homeassistant/www/custom-lovelace/

this is where I put monster.js

in ui-lovelace.yaml (which is the method I use but another method allows this to done in the UI) I refer to monster as

  - url: /local/custom-lovelace/monster-card.js?v=0.2.3
    type: js

You can use Thomas Lovens fold-entity-row like this:

          - type: entities
            title: Automations & Scenes
            show_header_toggle: false
            entities:
              - type: custom:fold-entity-row
                open: true
                head: group.all_automations

image

1 Like

@wmaker, thanks for the info, it seems to be the last I needed in order to get this going. I’ve got the monster card all setup now and it’s working great!

@DavidFW1960, I’ll definitely have to check that out, as I like the idea of being able to collapse the entries. Thanks for the tip!

For anyone else trying to get this setup, if you’re using HA v0.86.0 or newer (where Lovelace is the default UI), and you don’t have a ui-lovelace.yaml file, you add the JS by going into the UI config (three dots in the top right-hand corner of the UI), and then clicking on the three dots again and choosing “Raw config editor”. You then enter the below.

resources:
  - type: js
    url: /local/custom-lovelace/monster-card.js?v=1

And then for the actual card code I have:

type: 'custom:monster-card'
card:
  title: Scripts
  type: entities
  show_header_toggle: false
filter:
  include:
    - domain: script

you can use this lovelace plugin

type: custom:auto-entities
card:
  type: entities
filter:
  include:
    - domain: automation

@gjch
HACS makes all that for you.