I should add that it wasn’t my method, I filched it from someone else and had wanted to add an edit to my original post to that effect after it got a few likes, but because I can’t remember who I got it from to credit, never did.
any reason not to use {{ states.automation | list | count }} ?
also, since ive just posted this as a solution to list and count domains, would you shorten that too with this |list|count: {{ states| groupby('domain') | list | count }} (since we need the for loop there anyway)
value_template: >
{%- for d in states | groupby('domain') %}
{% if loop.first %}{{loop.length}} Domains:
{% endif -%} {{d[0]}},
{%- endfor %}
It was mine I’m ashamed to say I always find a way to make my templates as long winded as possible.
@petro you need to share your repo with me so I can learn anchors wait till you see my energy consumption template abortion, but hey it works its just really really really long.
I’ve been working the past 2 weeks to get my system into a cohesive setup. You don’t want to see my set up at the moment because it is very complicated where it doesn’t need to be, I haven’t updated sections since my initial startup (in 2016). I’m trying to streamline every page of my UI while removing stuff that doesn’t work / I don’t need anymore / is getting depreciated. I’m actually pretty close and I hope to have it posted within a week. I just have a bunch of appdaemon automations that I need to update, but I’ll do that after I post it.
Does anyone know what would be the best way to obtain system stats such as CPU, temperature, disk usage, etc from a remote Ubuntu 18.x Linux server please?
HA automatically takes any temperature and converts it to your system temperature units. I have my system units set as ºF. I suppose I could remove the conversion in a template, keep it with ºF in the graphs and just change the display on the card. But that’s not worth the effort IMO.