Is a day/night visual possible? e.g.
With the mini-graph its a plot of the tod binary_sensor.
Is a day/night visual possible? e.g.
With the mini-graph its a plot of the tod binary_sensor.
You can convert binary_sensors into something you can display on the graph using transform
. Examples are in the documentation.
First stab gives me this
based on this code:
- type: custom:apexcharts-card
header:
show: false
graph_span: 1w
series:
- entity: sensor.penberth_water_level_stage
name: Penberth Level
- entity: input_number.penberth_flood_alarm
color: red
show:
legend_value: false
- entity: binary_sensor.night
transform: 'return x === "on" ? 1 : 0;'
color: grey
type: area
group_by:
func: raw
apex_config:
stroke:
width: [1,1,0]
Only issue is the ‘on’ level of the binary_sensor seems to hit a point and then come back down rather than stay at that level. Any suggestions?
Yep, add curve: stepline
to the binary_sensor serie
Many thanks - that did the trick
New Release
People using:
apex_config:
stroke:
width: [1,2]
should convert it into:
series:
- entity: x.y
stroke_width: 1
- entity: y.z
stroke_width: 2
People using:
apex_config:
fill:
opacity: [1, 0.2]
should convert it into:
series:
- entity: x.y
opacity: 1
- entity: y.z
opacity: 0.2
config_templates
: Define a chart template once, reuse it many times. Also useful with the new color_list
option.
all_series_config
: Apply one config to all series at the same time
Experimental stuff : This is new and you’ll have to opt-in to use the features as they break some other features (listed in the documentation).
color_threshold
to display rainbows disable_config_validation
: to break the configurationhidden_by_default
: It will toggle a serie initially as if you had clicked on the legendconfig_templates
, apply the same config to every series with all_series_config
and add color_list
to define your color list in one shot (#64) (17004a3)hidden_by_default
to toggle series on load (#62) (63717b7), closes #60
opacity
of the line or area (8dfb3fd), closes #57
Isn’t it possible for bars?
It is possible yes.
the new template system
does it apply to the apex_config: entries
Yes, to the whole configuration!
I released this feature because I believe you all already start to have massive configs that you have to replicate many times and I don’t like writing twice the same code
ok i have to work out what i did wrong
yep massive over 2000 lines extra at moment
Let me know if there’s something wrong. I have reused the code I use in button-card so it should be pretty solid, but you never know
my file is too long to post here … 3500 lines of raw config
I’d suggest you just experiment with a small config first to understand how it merges stuff together and then you can go full throttle
thats too much like common sense
much more fun to try on live config
haha, well good luck
BTW, there was a error in the doc that I just corrected: https://github.com/RomRider/apexcharts-card/commit/ea1fef45736b11fa79a78ca1ac59e7c80c42b39a
duh got me on that one
even better when I spotted it had a S at the end
appears to be working now - thanks
Are there any plans to make it possible to plot two lines but with different y-axis? As an example, I have this one showing outdoor temperature together with if my heating pump is using the immersion heater (in kW). I have a bunch of graphs similar to this.
That is already possible with
apex_config:
yaxis:
- # config axis1
- # config axis2
Also check the forum above, you’ll find some examples.
I have totally missed that, thanks a lot!