Hey people, relatively new to doing anything other then standard HA cards and I like the puzzle/challenge, but I ran into one I could not figure out.
Trying to make 2 charts for my electrical use for the current month and the previous month.
1 has and Offset of -30 days
Both read and display the data, but some how the scale on both is different.
code below, the only difference with the other charts is that that does not have the offset in it
The code for both is exactly the same, only different is the offset: ‘-30days’ in the one for March.
But why is the width (x-axis) so different on both? Why is the April one so short in the middel and the March one filled all the way to both sides? I would expect them both to be filled all the way to both sides.
And is there a way to force the y-axis to show maybe to 20 instead of being dynamic?
Finally gave config-template-card a shot but I’m (of course) failing
I installed it via HACS and even restarted and below is my code. Do you see anything obvious that I’m missing?
title:
text: ${'Vind.' + states['sensor.mrg_wind_speed'].state + ' °C'}
align: right
“play it as you like” template or card_mod
{% set state = states('sensor.x_wind_speed')|float(-1) %}
{% if state >= 6 %} red
{% elif state >= 5 %} #FFBF00
{% elif state >= 4 %} blue
{% elif state >= 3%} green
{% else %} green
{% endif %}
my first post here. I love this card and my dashboard is looking nice because of it!
I am struggling to display totals of stacked columns. I have it working for another chart.
but for this one
Related to config-template-card… Is anything of the following possible?
Show a label only over the current hour in a column chart similar to my picture below? @Kertz1954, your sample code did it for the yaxis but with both xaxis AND yaxis I’m stuck.
Highlight the current hour in a column chart like below in a different color.
I have managed the two above but the code isn’t pretty so if it is possible in a better way it would open up to do things that are currently broken because of my not so good looking code.
Showing markers makes the line graph look pretty nice but I prefer to only have a marker at the very last datapoint. Problem is that there isn’t a fixed amount of datapoints in a line graph. Changes over time and depends on the device.
Has anyone found a way to retrieve the number of datapoints so that value can be used to only show a marker for the very last datapoint?
dataPointIndex is what needs to be updated dynamically.
Did you ever find a way to get the last dataPointIndex for markers? In my chart it varies over time from around 55-65 and I would like to get the last dataPointIndex in order to show a marker for that one only (se my post above).
png)
I have group_by hour with devices consomation, so the bar mean the consomation between two hour.
So ,… is there somebody who know the solution to move the column between the hour ?