Hallo zusammen,
ich habe bereits mit einer Markdown-Card die Entitäten einer Gruppen von aktuellen Leistungsverbräuchen angezeigt.
type: markdown
content: >-
| |
:---|:---|---:
{% for entity in expand('sensor.wohnzimmer_power_current') |
sort(attribute='name') | map(attribute='entity_id') | map('string') | list %}
<ha-icon icon="mdi:lightning-bolt"/> | {{ state_attr(entity, 'friendly_name')
}} | {{ states(entity) }} {% if states(entity) != "unknown" %} W {%
endif %}
{% endfor%}
|
:---|---:
<b>Gesamt</b> | <b>{{states('sensor.wohnzimmer_power_current')}} W</b>
card_mod:
style:
ha-markdown:
$: |
table {
width: 100%
}
table th:first-of-type {
width: 1%;
}
table th:nth-of-type(2) {
width: 50%;
}
table th:nth-of-type(3) {
width: 30%;
}
Mit <a href=""/> kann man auch Links einfügen.
Ist es auch möglich dabei einen Service aufzurufen, der z.B. den Smart-Plug umschaltet oder die Details (Verlauf) der Entität anzeigt?
Ersteres ist ja bei einer Tile-Card möglich, eine Aktion auf dem Icon zu definieren und letzteres geht ja bei einer normalen Entitäten-Card.