Hi! Thanks to RomRider for such an awesome addition to Home Assistant, and everyone contributing. Its truely admirable!
I have tried my best to search this thread and github page for tips on how to implement, but have not found what I was looking for yet. Hope its ok to ask:
Is there a way to group and sum/avg per hour of the day (0-24) over a period of a week or month?
I wanted to try to make a graph that presents stacked columns of consumption categories (heating, charging, hot water, el-devices, light) and its total consumption as Y-axis. Then hour of the day as X-axis.
I looked at using offset, but it got quite messy. Any tips or directions to look towards?
Nordpool is a sensor pulling data from european electricity spot market. Level is a code made by vilhelm.carlsson to split the day prices according to median price into 5 groups. His code can be found from here
What i wish to gain is predictability, to be able to see right away how many and which hours do fall in which category.
Do you guys think that I can do the coding with apex using javascript. In a way creating a value for each hour with the code already implemented on vilhem’s sensor
Hi folks, just starting to get to grips with ApexCharts, fantastic add-on with more options than I know what to do with!
I was wondering if it’s possible to use a script in Home Assistant to toggle the visibility of a series in a chart, much the same as a user manually clicking on the series name in the legend would do?
Thinking I would use this to create custom buttons outside of the chart card, which could be used to show/hide multiple series at a time, or to have the the states shown in the header activate the toggle visibility script as their click action by activating the script.
Interesting idea Have a look at the “conditional card”, it won’t solve your problem out of the box but with a variable that you toggle you can have charts show/hide.
I really like this beautiful card.
Today I need your help. I want to display a graph with consumption per week. Unfortunately the values shown are wrong and I don’t know what I’m doing wrong.
Here is my code. I also include two pictures. The first one is chart by which is ok. The second one is week and the values are not correct. It does not display the total amont of the weeks.
Code:
I wonder, how I would best plot a pie with a single percentage value and format (Size, color and position) the datalabel of that cake piece.
In that example, the 1 should be formatted.
I wonder if is possible to template in some way the in_chart show option of a serie in order to dynamically show or hide the serie from the graph according, for example, to the value of the serie itself.
I also used the ApexCharts Card to make some nice pies
This one is linked to Utility Meter “Consumo Ali y Carlos”
And this one is linked to Utility Meter “Consumo Diego y Poli”
Pies get the total directly from the Shelly sensor, and the partials from the utility meters. As you can see, the sum of the partials on the pies doesn’t equal the total, but the sum of the partials from the Energy dashboard does match. As both Energy dashboard and ApexCharts cards are feed from the same data, I’m pretty lost about what can be causing this.
I am representing a chart with the price by hour for the electricity.
I have data to cover future values as well, so I used the option DATA GENERATION:
Everything looks good but the header, it is showing the last value of the array of the series generated by the function. I would like to show the NOW value which is 0.15. Is there a way to do it ?.
Another question, Now each column in the center of the hour. so for example in the photo, the marker NOW is showing that it is almost 14:00 which is the correct current time, but it is in between the column of 13:00 and 14:00 and it can create confusion understanding the current price. It is a way to make the column wider to cover the hour?
Helllo, first of all i must say i love this card, it looks really good. I have made a card that shows todays electricity price, and my “cut off” limits for water heater and heating. For now, i have made the “cut offs” show as lines, but i would like to change the color of the columns instead. To do that, i would need to change the color threshold value based on my sensor values.
It would look something like this
But what i want it to be is something like this, but it returns “value.series[0].color_threshold[2].value is not a number” i have tried different methods but nothing seems to work. Is there a way to convert the sensor value to the right type of number?
Hi, Is it possible to use a If state like by Name?? this seems not to work.
I want to make something like i can switch between day and week by a button in the graph.
SO try to switch the name to day to week
Have you managed to fix this? unning into the same issue right now. 3 series, 2 yaxis - one of the two which “share” the same axis has an offset and is not alligned correctly =/
Temperature Inside and Outside should share the same yaxis on the left - Day/Night is realised by a second yaxis on the right (hidden). Unfortunately Inside Temerature doesn’t seem to be on the same yaxis as Outside Temperature even if it is assigned to the same axis =(
I love the color_threshold but also want to use the area option somehow. is it possible to fill the line with the threshold with a gradient while keeping the line colorful?
Code:
type: custom:apexcharts-card
graph_span: 7d
apex_config:
legend:
show: false
brush:
selection_span: 3d
experimental:
color_threshold: true
brush: true
all_series_config:
stroke_width: 3
header:
show: true
floating: false
title: Outside vs. Inside (7d)
show_states: true
colorize_states: true
yaxis:
- id: left
- id: right
show: false
opposite: true
series:
- entity: sensor.outside_temperature
name: Outside Temperature
yaxis_id: left
type: line
opacity: 1
fill_raw: last
color_threshold:
- value: 0
color: ffffff
- value: 8
color: '#318ce8'
- value: 16
color: '#bcf74f'
- value: 24
color: '#ff9600'
show:
extremas: time
in_brush: true
- entity: sensor.miaomiaoce_inside_temperature
name: Inside Temperature
yaxis_id: left
fill_raw: last
color: '#FFC300'
show:
extremas: time
in_brush: true
- entity: binary_sensor.night
yaxis_id: right
transform: 'return x === "on" ? 1 : 0;'
stroke_width: 0
color: black
opacity: 0.2
type: area
curve: stepline
show:
in_header: false