One thing I’ve struggled with is the seeming lack of an Operations or Management Console for HA. I’ve started to throw some things together, but still have a long ways to go. My console so far lists
I use a markdown card with this code to keep track of when automations have fired, maybe something you would like?
|D|H|M||Name|
|----:|----:|----:|:--:|:----|
{% for state in states.automation
|selectattr('attributes.last_triggered', 'defined')
|selectattr('attributes.last_triggered')
|sort(attribute='attributes.last_triggered', reverse=true) -%}
{%- set t = now() - state.attributes.last_triggered -%}
{%- set days = t.days if t.days > 0 else ' ' -%}
{%- set hrs = t.seconds//3600 %}
{%- set hrs = hrs if hrs > 0 else ' ' -%}
|{{days}}|{{hrs}}|{{(t.seconds//60)%60}}||_{{state.name}}_|
{% endfor %}
That’s a great addition - I have added it! Because I have over 200 automations though - it was a bit long so I added a scroll bar.
I notice that if an automation has never been triggered, it will not show up in the list. Any thoughts on how to make that show up? I made a version of this card to show scripts - and that’s where I noticed that 2 of my scripts didn’t show up because they had never run - which, when I identified that, was good information as I can then look at them to determine why not? Are they needed? I find sometimes I have stuff sitting around that I wrote long ago and is no longer necessary (typically as I learn more about HA, I realize that the way I wrote stuff a year ago was not that great!)
type: markdown
content: |-
|D|H|M||Name|
|----:|----:|----:|:--:|:----|
{% for state in states.automation
|selectattr('attributes.last_triggered', 'defined')
|selectattr('attributes.last_triggered')
|sort(attribute='attributes.last_triggered', reverse=true) -%}
{%- set t = now() - state.attributes.last_triggered -%}
{%- set days = t.days if t.days > 0 else ' ' -%}
{%- set hrs = t.seconds//3600 %}
{%- set hrs = hrs if hrs > 0 else ' ' -%}
|{{days}}|{{hrs}}|{{(t.seconds//60)%60}}||_{{state.name}}_|
{% endfor %}
card_mod:
style: |
ha-markdown {
max-height: 300px;
overflow-y: auto;
}
Sorry, no idea how to make it display automations that have not run, I have some automations that I do not want to run my self (water leak sensors), but these I test from time to time.