I have a soil sensor that gives humidity and temperature, and I would like a nice graph with the values.
This config for apexchart will show the graphs:
type: custom:apexcharts-card
header:
show: true
standard_format: false
title: Jordsensor
colorize_states: true
show_states: true
graph_span: 1d
all_series_config:
stroke_width: 2
type: line
yaxis:
- id: moisture
min: 0
max: 100
apex_config:
tickAmount: 5
- id: temperature
min: -10
max: 50
opposite: true
apex_config:
tickAmount: 6
apex_config:
dataLabels:
enabled: true
dropShadow:
enabled: true
series:
- entity: sensor.soil_sensor_soil_moisture
curve: smooth
name: Jordfugtighed
group_by:
duration: 30m
func: avg
yaxis_id: moisture
- entity: sensor.soil_sensor_temperature
curve: smooth
name: Jordtemperator
group_by:
duration: 15m
func: avg
yaxis_id: temperature
But of course, I want more, so I tried adding color_threshold (the thresholds are not set appropriately yet):
type: custom:apexcharts-card
experimental:
color_threshold: true
header:
show: true
standard_format: false
title: Jordsensor
colorize_states: true
show_states: true
graph_span: 2d
all_series_config:
stroke_width: 2
type: line
yaxis:
- id: moisture
min: 0
max: 100
apex_config:
tickAmount: 5
- id: temperature
min: -10
max: 50
opposite: true
apex_config:
tickAmount: 6
apex_config:
dataLabels:
enabled: true
dropShadow:
enabled: true
series:
- entity: sensor.soil_sensor_soil_moisture
curve: smooth
name: Jordfugtighed
group_by:
duration: 1h
func: avg
yaxis_id: moisture
color_threshold:
- value: 0
color: iceblue
- value: 20
color: midnightblue
- value: 40
color: green
- value: 60
color: orange
- value: 80
color: red
show:
header_color_threshold: true
- entity: sensor.soil_sensor_temperature
curve: smooth
name: Jordtemperator
group_by:
duration: 1h
func: avg
yaxis_id: temperature
show:
header_color_threshold: true
color_threshold:
- value: -10
color: blue
- value: 0
color: blue
- value: 25
color: glue
- value: 30
color: blue
- value: 35
color: blue
Which gives me this, rather odd graph, where only ONE of the intervarls are drawn on the graph?
I know the threshold is experimental, but shouldn¨t this work?