excuse me I was trying to do it after “set values” whereas you had done it before
thanks
I don’t follow what you mean, there’s no “set values”
Nevermind. It’s defined before but executed during the set values. Why do you want to do it after? The result is identical.
Have you tried the macro, or are you trying to reverse engineer the code? Because this puralizes everything without failure…
to my shame I wanted to improve it before having read it in full, understood and tried.
it works fine without my customization.
sorry for inconvenience
Thank you for this, helped this beginner to set this up, on my now final test on the zotac running via os… so stats of that and nas side by side
sharing please! xD
is that directed at me bud?
Hi,
Please help me fix below:
Logger: homeassistant.helpers.template
Source: helpers/template.py:1612
First occurred: 14:19:33 (3 occurrences)
Last logged: 14:20:00Template variable warning: No first item, sequence was empty. when rendering ‘{%- set up_time = as_timestamp(now())-as_timestamp(states(‘sensor.uptime’)) %} {%- macro phrase(name, divisor, mod=None) %} {%- set value = ((up_time // divisor) % (mod if mod else divisor)) | int %} {%- set end = ‘s’ if value > 1 else ‘’ %} {{- ‘{} {}{}’.format(value, name, end) if value | int > 0 else ‘’ }} {%- endmacro %} {%- set values = [ phrase(‘week’, 6060247), phrase(‘day’, 606024, 7), phrase(‘hour’, 6060, 24), phrase(‘min’, 60) ] | select(’!=‘,’‘) | list %} {{ values[:-1] | join(’, ‘) ~ ’ : ’ ~ values[-1] if values | length > 1 else values | first }}’
yes, of course
type: custom:config-template-card
variables:
- states['sensor.homeassistant_version'].state
- states['sensor.disk_total'].state
- states['sensor.disk_use'].state
- background: url("/local/images/black.jpg")
entities:
- sensor.homeassistant_version
- sensor.disk_free_home
- sensor.disk_use
card:
type: custom:hui-entities-card
theme: ios-dark-mode-red
show_header_toggle: 'off'
style: >
ha-card { --sidebar-background: #fffff filter: contrast(96%) drop-shadow(3px
3px 5px 00FFFF); -webkit-filter: contrast(96%) drop-shadow(3px 3px 5px
#00FFFF); -moz-filter: contrast(96%) drop-shadow(3px 3px 5px #00FFFF);
background: url("/local/images/blacka.jpg");
}
entities:
- type: section
label: ${ 'ZOTAC PI335 - Hassio OS - ' + vars[0] }
styles:
label:
- font-size: 10px
- type: custom:hui-vertical-stack-card
cards:
- type: horizontal-stack
cards:
- type: picture
style: |
ha-card {
--paper-card-background-color: 'rgba(0, 0, 0, 0.0)';
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--ha-card-box-shadow: 'none';
background: url("/local/images/black.jpg");
}
image: /local/images/devices/nuc_5.png
- type: custom:button-card
layout: icon_name_state2nd
show_icon: true
show_state: true
styles:
grid:
- grid-template-columns: 10px auto
icon:
- padding: 0px 10px
- height: 30px
- width: 30px
card:
- background: url("/local/images/black.jpg")
- '--ha-card-box-shadow': none
state:
- padding: 10px 0px
- justify-self: left
- font-family: Roboto, sans-serif
- font-size: 16px
name:
- padding: 0px 0px
- justify-self: left
- color: var(--secondary-text-color)
entity: sensor.homeassistant_uptime
name: Uptime
icon: mdi:clock-outline
- type: custom:bar-card
bar-card-background: url("/local/images/black.jpg")
title_position: inside
show_icon: true
align: split
columns: 1
max: 100
unit_of_measurement: '%'
severity:
- value: 50
color: '#3498db'
- value: 75
color: '#f39c12'
- value: 100
color: '#e45e65'
style: |
ha-card {
-bar-card-background: url("/local/images/black.jpg");
}
entity: sensor.disk_use_percent
title: ${ 'Disk (' + vars[2] + 'Gb/' + vars[1] + 'Gb)' }
- type: horizontal-stack
cards:
- type: custom:bar-card
title_position: inside
show_icon: true
align: split
columns: 1
max: 100
unit_of_measurement: '%'
severity:
- value: 50
color: '#3498db'
- value: 75
color: '#f39c12'
- value: 100
color: '#e45e65'
style: |
ha-card {
--sidebar-background: #fffff filter: contrast(96%) drop-shadow(3px 3px 5px 00FFFF);
background: url("/local/images/black.jpg");
}
entity: sensor.memory_use_percent
name: USED
title: RAM
- type: custom:bar-card
background: url("/local/images/black.jpg")
show_icon: true
align: split
columns: 1
max: 100
unit_of_measurement: '%'
severity:
- value: 50
color: '#3498db'
- value: 75
color: '#f39c12'
- value: 100
color: '#e45e65'
style: |
ha-card {
--sidebar-background: #fffff filter: contrast(96%) drop-shadow(3px 3px 5px 00FFFF);
background: url("/local/images/black.jpg");
}
entity: sensor.processor_use_percent
name: USED
title: CPU
- type: custom:mini-graph-card
height: 20
line_width: 2
font_size: 0
hours_to_show: 168
points_per_hour: 1
show:
extrema: true
fill: true
style: |
ha-card {
--ha-card-background: "rgba(0, 0, 0, 0.0)";
--ha-card-box-shadow: 'none';
border-radius: 5px;
background: url("/local/images/black.jpg");
}
entities:
- sensor.nuc_cpu_temperature_core_zone_2
name: Temperature
color_thresholds:
- value: 90
color: '#3498db'
- value: 120
color: '#f39c12'
- value: 150
color: '#E45E65'
card_mod:
class: soft-ui
style: >
ha-card { --sidebar-background: #fffff filter: contrast(96%) drop-shadow(3px
3px 5px 00FFFF); -webkit-filter: contrast(96%) drop-shadow(3px 3px 5px
#00FFFF); -moz-filter: contrast(96%) drop-shadow(3px 3px 5px #00FFFF);
background: url("/local/images/blacka.jpg");
}
thats for both cards change to suit your theme and images to what you want for backgrounds using petros script though but slightly adjusted have attached both images I currently use if you want them which makes it look this way, you can change for what ever images you want. add this card under manual in ui, then just change entities to your ones
Hi, this works for me:
{%- set up_time = as_timestamp(now())-as_timestamp(states('sensor.uptime')) %}
{%- macro phrase(name, divisor, mod=None, minVal=1) %}
{%- set value = ((up_time // divisor) % (mod if mod else divisor)) | int %}
{%- set end = 's' if value > 1 else '' %}
{{- '{} {}{}'.format(value, name, end) if value | int >= minVal else '' }}
{%- endmacro %}
{%- set values = [
phrase('week', 60*60*24*7),
phrase('day', 60*60*24, 7),
phrase('hour', 60*60, 24),
phrase('min', 60, 60),
phrase('sec', 1, 60, minVal=0)
] | select('!=','') | list %}
{{ values | first }} ago
congratulations for this card.
could you post the code?
it’s no different than the code posted in the original post if you’re looking for an example.
graphically it is different,
there is the CPU bar and below the graph. I would like to understand how to do this step
It’s no different than the CPU percentage in the original post… Here’s the example in the original post:
They all use the same thing. That’s how the frontend works. Just because it’s in a different spot doesn’t mean its a different control.
If you’re having trouble with that distinction, then this might be slightly outside of your comfort zone. This single bar setup requires 2 custom cards: card-mod, bar-card.
I’m a beginner and I’m trying to learn how to use the various cards.
sorry for my english but i am using the translator
Hi all,
I am using this monitor solution for monitoring my NUC for some time now.
But recently I run into a strange error with the Lovelace card i have.
Custom element doesn't exist: hui-vertical-stack-card.
Does anyone have this also and do you have an idea why this is showing up.
The card is’nt visible anymore in my dashboard.
I found the solution in this link:
Use hue-element and vertical-stack
- type: custom:hui-element
card_type: vertical-stack
There has been a change with the latest Home Assistant upgrade (2021.7), where the support for hue-vertical-stack-card was removed.
@liamstears Thank you for inspire me, this is mine:
Also, @Hs82H thank you too, this is my system monitor based on your post (28) : System Monitoring - How does your look? - #933 by josepdomotica
if anyone wants to thank anyone it should be @petro this is all based of his original code, including my versions