Automations card in default view: How can I get it back?

I’ve been running HA 0.105 for a long while, and it always showed all automations in the default view. A long list, sure, but I just loved to have one page that auto-updated and showed just everything.

I’ve lately upgraded to 0.111 and now to 0.112, and the Automations card has gone. How can I get it back?

The basic idea is that I want to keep the self-updating “show-all” default view, while making custom “dashboards” for other uses.

Not sure I can help with the “automated” card. (I run manual yaml)
But when I install something new, it creates entities and then as I integrate that into my system I need automations, scripts, input booleans etc.
So at the end I look for “unused entities”, checking if any can be deleted or removed or just tidied away.
I then sweep the rest into a parking page so that when new entities then crop up I can spot them easily.
This is part of what I use to generate a view (Parking) containing those (it covers all my domains, but the following is just automations) : -

    ### Parking For Automation
    - type: entities
      title: Parking For Automation
      show_header_toggle: true
      entities:
{% for state in states.automation -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}

Paste that into Developers Tools - Template, and what it generates is a full list of “automations” card
The full template generates a whole “View”.

Looks like a good idea, [rant] but why is it that always good stuff gets taken away, only to be substituted by something much more complicated? I just loathe getting patronized by this new-fangled UI stuff all the time …[/rant]

Tried to put this into a “manual card” using the so-called “code editor”, but it insists that

missed comma between flow collection entries at line 5, column 2: {% for state in states.automation -%} ^

Thanks for the hint “I run manual yaml”! How would I switch to that?

Good F$%ing question. I don’t know.

There’s no way to get it back without taking control of a dashboard. So you might have to create a new dashboard for your automations list, (so you don’t mess with your auto-generated one) then use the custom auto-entities card.

type: custom:auto-entities
card:
  type: entities
  title: All Automations
filter:
  include:
    - domain: automation
1 Like

You mean I have to install extra stuff just to make for something that can be done using a simple Jinja for loop like you showed? Nope …

Hoped I’d find something in .storage but my newly-created “Test” dashboard is a JSON file called lovelace.lovelace_test. D…arn!

How would I be able to also run “manual yaml” instead? I run HA Core anyway, because I need to install extra things in my OS (that get used by HA).

Important : See Edit at Bottom

No, this is not a “manual card” this generates the yaml that “is” the manual card.
Copy the output from the template editor
Go back to a standard overview page
From your UI. hit the 3 dots (more) in the top right corner.
Select Configure UI
Then do it again (select 3 dots), but this time its “Raw configuration editor”
Find the view in which you wish to insert the card, find a card you want to place this before (or after) and paste it in before (or after) that. Back out, Admire your handiwork !

Edit: Tom is bang on about “messing” with stuff, create a new dashboard (so you can just delete it if you don’t like where it takes you) that way you have your own sandbox.

Ah, I’m beginning to understand … (I think). So you’re saying you’re basically not automatically generating the entities to display within the card but have to manually create the list of entities in the template editor and paste it over?

I tried that (and it works) but stumbled upon the template editor: My automation list is several screen pages long and when trying to mark it (for copypaste), the marked always disappears when starting to move down (because it’s more than a screenful). So I had to copypaste part by part, copy it all together in an external editor, then paste it all back into my entities card. Awkward.

Also, it doesn’t accept a dict but wants a list, I modified that by using

[
{% for state in states.automation -%}
{{ '  ' ~ state.entity_id ~ ','}}
{%- endfor %}
]

I really wonder if the original self-updating “Automations” card is still somewhere and could be re-activated … would save endless amounts of time and be less error-prone …

Yes !
hence manual yaml

No, there’s a knack to it, just mark start and continue dragging down till you get it all (it selects outside the box till you get there, just persist)

Eh ? I use this religiously, never had a problem, can’t think why yours would be different.

Yes, in your usage needs, that would be ideal.
If one of the GUI guys drop by (I’ll not tag anyone) but they ‘may’ be able to help you get back on track.

Very odd, I gave it a (pasted-in) list, now it converted everything back (using an entity card):

type: entities
title: Parking For Automation
show_header_toggle: true
entities:
  - automation.alarm_clock_settings
  - automation.astronomy_astrolights
  - automation.audio_alert_volume_day
  - automation.audio_alert_volume_night
  - automation.audio_alerts_message
  - automation.auto_renew_ssl_cert
  …

So it looks like the

was overdoing it and I should have used:

{% for state in states.automation -%}
{{ '        - ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}

instead.

Thanks for taking the time to help me along with this!

I think the basic difference is that I’m working in yaml and that you are populating a card entity (which then gets transcribed into yaml)
We both completed the race but by slightly different routes

Looks like. I’d actually prefer working in yaml (and do my own errors), any pointer on how to do that? Like having this lovelace thingy in yaml instead of hidden JSON? (Ideally without losing the first, default, dashboard?)

This one actually got converted to JSON (not YAML), into .storage/lovelace.lovelace_test (excerpt):

                {
                    "badges": [],
                    "cards": [
                        {
                            "entities": [
                                "automation.alarm_clock_settings",
                                "automation.astronomy_astrolights",
                                "automation.audio_alert_volume_day",
                                "automation.audio_alert_volume_night",
                                "automation.audio_alerts_message",
                                "automation.auto_renew_ssl_cert",
                                "automation.bei_dunkelheit_einschalten",
                                "automation.bei_helligkeit_ausschalten",
                                "automation.bei_sonnenuntergang_einschalten",
                                "automation.bewegung_flur_zurucksetzen",
                                "automation.calendar_event_geburtstage",
                                "automation.calendar_event_matthias",
                                "automation.call_connected",
                                "automation.call_finished",
                                "automation.cheerlights_astrolights",
                                "automation.device_tracker_battery_alerts",
                                "automation.doorbell",
                                "automation.esszimmerlampe_an",
                                "automation.esszimmerlampe_aus",
                                "automation.flurlicht_an_bei_bewegung",
                                "automation.flurlicht_aus_ohne_bewegung",
                                "automation.frank_nicht_zuhause",
                                "automation.frank_zuhause",
                                "automation.goodnight",
                                "automation.happy_hour_begins",
                                "automation.happy_hour_ends",
                                "automation.idjc_error",
                                "automation.idjc_mic_closed",
                                "automation.idjc_mic_open",
                                "automation.idjc_off",
                                "automation.idjc_offline",
                                "automation.idjc_on",
                                "automation.idjc_online",
                                "automation.incoming_call",
                                "automation.internet_off",
                                "automation.internet_on",
                                "automation.kaffee_kochen",
                                "automation.last_orders",
                                "automation.leisegedanken_de_off",
                                "automation.leisegedanken_de_on",
                                "automation.lufter_wohnzimmer_alert",
                                "automation.lufter_wohnzimmer_an",
                                "automation.lufter_wohnzimmer_aus",
                                "automation.main_computer_off",
                                "automation.main_computer_on",
                                "automation.main_screen_alert",
                                "automation.mullabfuhr_problemmull",
                                "automation.mullabfuhr_restmull",
                                "automation.mulleimer_reingeholt",
                                "automation.mumble_aktivitat",
                                "automation.outgoing_call",
                                "automation.party_mode",
                                "automation.persons_coming_home",
                                "automation.pflanzenlampe_alert",
                                "automation.pflanzenlampe_an",
                                "automation.pflanzenlampe_aus",
                                "automation.random_speaker",
                                "automation.say_date_time",
                                "automation.say_morning_info",
                                "automation.say_phase_of_day",
                                "automation.say_time",
                                "automation.schalter_fur_bettlampe_klein_synchronisieren",
                                "automation.schalter_fur_bettlampe_synchronisieren",
                                "automation.sensors_battery_alerts",
                                "automation.ssl_expiry_notification",
                                "automation.syncthing_aktivitat",
                                "automation.syncthing_off",
                                "automation.syncthing_on",
                                "automation.test_gazoo",
                                "automation.test_light_animation_speed",
                                "automation.timer_hard_egg_cancel",
                                "automation.timer_hard_egg_finished",
                                "automation.timer_hard_egg_start",
                                "automation.timer_pizza_cancel",
                                "automation.timer_pizza_finished",
                                "automation.timer_pizza_start",
                                "automation.timer_soft_egg_cancel",
                                "automation.timer_soft_egg_finished",
                                "automation.timer_soft_egg_start",
                                "automation.update_available_notification",
                                "automation.wecker",
                                "automation.witching_hour",
                                "automation.zur_bettzeit_ausschalten"
                            ],
                            "show_header_toggle": true,
                            "title": "Parking For Automation",
                            "type": "entities"
                        }
                    ],
                    "path": "parking",
                    "title": "Parking"
                }

in my configuration.yaml I have : -

lovelace:
  mode: yaml

within my config folder I have a ui-lovelace.yaml file and my broswser points to it from : -

http://192.168.0.200:8123/lovelace/0

Change to your instance

I also have two other dashboards

  1. is a full copy of my ui-lovelace.yaml version
  2. is user only access to a reduced set of views/cards
    The last is accessed from : - http://192.168.0.200:8123/lovelace-user/0
    Because lovelace-user is what I called it

Note the differences in the url’s

A-ha! Thanks a bundle, now this looks feasible. Especially since I want to have the same: An admin-only “does-all” manual thingy, plus a user “nice view”, reduced to only what they want/need.

I’ll surely experiment with that

lovelace:
  mode: yaml

setting!

I currently have

https://has1.example.com/lovelace/default_view

and

https://has1.example.com/lovelace-test/…

URLs.

Beware : -
To get reduced “user-level” access with : -

lovelace:
  mode: yaml

Is difficult if they are tech savy and change the url back to : - http://192.168.0.200:8123/lovelace/0
That’s why people serious about keeping their kids out of the tinkering pages don’t use it and actually delete the ui-lovelace.yaml relying on the dashboards you can restrict access to.
So if you continue this route a ‘moderately’ secure method requires : -

  1. you only give out the http://192.168.0.200:8123/lovelace-user/0 url to ‘user level’ account holders
  2. you have to get onto their devices (requires their permission) to delete the old url and you create new shortcuts/bookmarks whatever to the new http://192.168.0.200:8123/lovelace-user/0 (or whatever you call it)

Note: when you first create your ui-lovelace.yaml you ‘may’ want to populate (the yaml file) with yaml outputted from my full template


  #### View Parking
  - title: Parking
    icon : mdi:parking
    cards:

## sensor
    ### Parking For Sensor
    - type: entities
      title: Parking For Sensor
      show_header_toggle: false
      entities:
{% for state in states.sensor -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
    ### Parking For 'Null Entities'
    - type: entities
      title: Parking For 'Null Entities'
      show_header_toggle: false
      entities:{% for state in states if 'Null ' in state.attributes.friendly_name %}
{{ '        - entity: ' ~  state.entity_id }}
{%- endfor %}

    ### Parking For Automation
    - type: entities
      title: Parking For Automation
      show_header_toggle: true
      entities:
{% for state in states.automation -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
    ### Parking For Scripts
    - type: entities
      title: Parking For Script
      show_header_toggle: false
      entities:
{% for state in states.script -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## binary_sensor
    ### Parking For Binary Sensor
    - type: entities
      title: Parking For Binary Sensor
      show_header_toggle: false
      entities:
{% for state in states.binary_sensor -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## climate
    ### Parking For Climate
    - type: entities
      title: Parking For Climate
      show_header_toggle: false
      entities:
{% for state in states.climate -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## device_tracker
    ### Parking For Device Tracker
    - type: entities
      title: Parking For Device Tracker
      show_header_toggle: false
      entities:
{% for state in states.device_tracker -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## group
    ### Parking For Group
    - type: entities
      title: Parking For Group
      show_header_toggle: false
      entities:
{% for state in states.group -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## input_boolean
    ### Parking For Input Boolean
    - type: entities
      title: Parking For Input Boolean
      show_header_toggle: false
      entities:
{% for state in states.input_boolean -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## input_datetime
    ### Parking For Input Datetime
    - type: entities
      title: Parking For Input Datetime
      show_header_toggle: false
      entities:
{% for state in states.input_datetime -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## input_number
    ### Parking For Input Number
    - type: entities
      title: Parking For Input Number
      show_header_toggle: false
      entities:
{% for state in states.input_number -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## input_select
    ### Parking For Input Select
    - type: entities
      title: Parking For Input Select
      show_header_toggle: false
      entities:
{% for state in states.input_select -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## input_text
    ### Parking For Input Text
    - type: entities
      title: Parking For Input Text
      show_header_toggle: false
      entities:
{% for state in states.input_text -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## other lights
    ### Parking For Lights
    - type: entities
      title: Parking For Lights
      show_header_toggle: false
      entities:
{% for state in states.light -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## media_player
    ### Parking For Media Player
    - type: entities
      title: Parking For Media Player
      show_header_toggle: false
      entities:
{% for state in states.media_player -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## person
    ### Parking For Person
    - type: entities
      title: Parking For Person
      show_header_toggle: false
      entities:
{% for state in states.person -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## sun
    ### Parking For Sun
    - type: entities
      title: Parking For Sun
      show_header_toggle: false
      entities:
{% for state in states.sun -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## switch
    ### Parking For Switch
    - type: entities
      title: Parking For switch
      show_header_toggle: false
      entities:
{% for state in states.switch -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## weather
    ### Parking For Weather
    - type: entities
      title: Parking For Weather
      show_header_toggle: false
      entities:
{% for state in states.weather -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}
## zone
    ### Parking For Zone
    - type: entities
      title: Parking For Zone
      show_header_toggle: false
      entities:
{% for state in states.zone -%}
{{ '        - entity: ' ~ state.entity_id }}
{{ '' }}
{%- endfor %}

Which covers a card for each domain under a single view (add your own views as required)
This will generate output for EVERY entity on your system for those domains listed (it’s about 50 sesonds of cutting and pasting at the end of each major editing session for me, I have 1071 entities, Marius has 3500 ish sensors alone)

Edit: because of the way HA shuffles cards to minimise page length, I’ve found it best to hit the ‘long list’ items first to help assist the length minimisation (otherwise I’d have gone with pure alphabetical)

1 Like

Wow, helpful. Thanks again, especially for the security warning.

Just so I understand: One could not put the above in ui-lovelace.yaml and the system would parse it as templates? You would have to put this in the template checker and manually copy-paste?

Btw, still didn’t get that copying working in one batch.
EDIT: Yes I did. Using the keyboard (not the mouse) works!

Wonderful approach!

Yes !

copylongtemplateoutput

I use the mouse to start selection at the top then drag down to ‘about’ the red X on the photo, wait till it completes - then move the mouse back up (to the end of puppy class, in this case), release the click, Ctrl-C and Ctrl-V and you are laughing :rofl:

And if you don’t like the output, just change the template (as you have done previously anyway (different headers, different order etc.))
Note too that the only domain where I have the header toggle enabled is automations. I write conditions to stop automations firing and do not “turn them off” - this allows a quick check and if I need to it’s one click off, one click on.

Hee hee :rofl:

This is really one of the most useful templates ever! Thanks for sharing it, really.
I love that the entities are alphabetized, something the old original didn’t. Just ideal if you need to look up something.

Guess I have to start a “template toolbox” now.

Just out of interest: What do you use the "Null " entities for?

There are certain entities that “Do Nothing For Me”
For instance with some Z Wave devices, they have a sourcenodeid (I assume this is for when you get (say) a smoke detector and it is node 21 and you’ve set it to message node 18 (your siren) directly, but there are maybe 3 smoke detectors and you want to automate why it went off and who called it. dunno !
It’s of no use to me so I just ignore such entities (I have a full set of entity naming notes so that ALL my entities are named in the same manner, makes cut and paste coding even easier, copy the bed1 light code rename all instances of "_bed1_" to "_bed2_" - done ! yaml is brilliant for that ) The ‘Null’ just emphasises that I shouldn’t need that for coding purposes or if the entity pops up in any Front End device (other than my parking) it probably shouldn’t be there.

Just for information : of the 1071 entities I have, 148 are "Null " ( that’s 13.8 % )

Yep I have one of those

:+1:
I also normally use quite strong rules for naming, only when starting with HA I knew near to nothing about it, so I really have to rework these. Unfortunately, I often struggle with “internal” vs “external” (i.e., friendly) names—not all things can be easily named “friendly”.

Also, people in my surroundings wish for a German UI while I tend to program, comment and name variables mostly in English.

Maybe one can’t have everything … :grin: