Okay, following some much needed help : -
I got into markdown and attributes - Many Thanks
I went back to my monitoring Heat On Times (HOT)
I found that the markdown could display the same information (minus the state indicative icons) as entities card but in just less than half the height
Using Attributes I could drop that by another two thirds
Inserting muliple ‘||||’ lines gives separators : -
But readabilty could be further improved by using colours
Less than half the height of entities card
- type: markdown
title: HOT History - Day
content: |
|{{'<b>Item '}}|{{' - '}}|{{'Value </b>'}}
|----:|:----:|----:|
||||
|{{'<b>' ~ state_attr('sensor.s_hot_heat_status', 'friendly_name') | replace('HOT ', '') ~ '</b>'}}|{{'-'}}|{{ states('sensor.hot_heat_status')}}|
|{{'<b>Last ON / OFF</b>' }}|{{'-'}}|{{ as_timestamp(states('input_datetime.hot_last_on')) | timestamp_custom('%H:%M', false) }}{{' - '}}{{ as_timestamp(states('input_datetime.hot_last_off')) | timestamp_custom('%H:%M', false)}}|
|{{'<b>Last ON Duration</b>' }}|{{'-'}}|{{ states('sensor.heat_last_on_duration') ~ ' h:m'}}|
|{{'<b>So Far Today</b>' }}|{{'-'}}|{{ states('sensor.hot_day_sofar_h') ~ ' h:m'}}|
|{{'<b>So Far Today</b>' }}|{{'-'}}|{{ states('sensor.hot_day_sofar_p') ~ ' % on'}}|
||||
||||
{% for item in states.sensor | selectattr('object_id', 'match', 'hot_dy_tot_h') -%}
|{{'<b>' ~ item.name | replace('HOT ', '') ~ '</b>' }}|{{'-'}}|{{item.state_with_unit}}|
{% endfor -%}
||||
||||
{% for item in states.sensor | selectattr('object_id', 'match', 'hot_dy_tot_p') -%}
|{{'<b>' ~ item.name | replace('HOT ', '') ~ '</b>'}}|{{'-'}}|{{('%.2f' | format(item.state | float(0))) ~ ' % on'}}|
{% endfor %}
Code for Above
AND -
Is about 1/6th the height and MUCH easier to compare values
- type: markdown
title: HOT History - Month
content: |
|{{'<b>Item'}}|{{' - '}}|{{' % Yr-0'}}|{{' % Yr-1'}}|{{' % Yr-2</b>'}}|
|----:|:----:|----:|----:|----:|
||||||
||||||
|{{'<b>Rng This Mnth</b>'}}|{{'-'}}|{{states('sensor.hot_mth_0_sofar')}}|||
||||||
||||||
{% for item in states.sensor | selectattr('object_id', 'match', 'hot_mth_y0_tot_') -%}
|{{'<b>' ~ (item.name | replace('HOT ', '') | replace(' This Year', '')) ~ '</b>'}}|{{'-'}}|{{'%.2f' | format(item.state | float(0)) }}|{{'%.2f' | format(item.attributes.yr_1 | float(0))}}|{{'%.2f' | format(item.attributes.yr_2 | float(0))}}|
{% endfor %}
Code for Above
I’ve looked at many posts for markdown colour but none seem to work (has something changed ?)
posts checked : -
(not sure how (the one above) this would help anyway, as I’d need to apply to single cells)
Do I need to use a custom card or is a mod/development on the way ?
Cheers
1 post - 1 participant