I’d like the state that’s shown in header to match the color of the graph, which is configured with:
type: custom:apexcharts-card
header:
show: true
show_states: true
colorize_states: false # this assigns one color per series
experimental:
color_threshold: true
graph_span: 24h
span:
start: day
series:
- entity: >-
event.octopus_energy_electricity_23l3457135_1620001552333_current_day_rates
type: column
unit: p
show:
legend_value: false
in_header: false
color_threshold:
- value: 30
color: red
- value: 20
color: orange
- value: 10
color: gold
- value: 0
color: green
data_generator: |
var points = entity.attributes.rates
.filter((x) => { return new Date(x.end) >= new Date()})
.map((x, index) => {
return [new Date(x.start), x.value_inc_vat * 100];
});
return points;
- entity: sensor.octopus_energy_electricity_23l3457135_1620001552333_current_rate
type: column
unit: p
transform: return x * 100;
show:
legend_value: false
in_header: true
in_chart: false
name_in_header: false
So in this case, 16.1, the current value, would be in yellow.