type: custom:apexcharts-card
graph_span: 2d
header:
show: true
title: Carbon Intensity Forecast
now:
show: true
span:
start: hour
series:
- entity: sensor.carbon_intensity_uk
name: Forecast
data_generator: >
return [[entity.attributes.forecast[0].from,
entity.attributes.forecast[0].intensity],
[entity.attributes.forecast[1].from,
entity.attributes.forecast[1].intensity],
[entity.attributes.forecast[3].from,
entity.attributes.forecast[3].intensity],
[entity.attributes.forecast[4].from,
entity.attributes.forecast[4].intensity],
[entity.attributes.forecast[5].from,
entity.attributes.forecast[5].intensity],
[entity.attributes.forecast[6].from,
entity.attributes.forecast[6].intensity],
[entity.attributes.forecast[7].from,
entity.attributes.forecast[7].intensity],
[entity.attributes.forecast[8].from,
entity.attributes.forecast[8].intensity],
[entity.attributes.forecast[9].from,
entity.attributes.forecast[9].intensity],
[entity.attributes.forecast[10].from,
entity.attributes.forecast[10].intensity],
[entity.attributes.forecast[11].from,
entity.attributes.forecast[11].intensity],
[entity.attributes.forecast[12].from,
entity.attributes.forecast[12].intensity],
[entity.attributes.forecast[13].from,
entity.attributes.forecast[13].intensity],
[entity.attributes.forecast[14].from,
entity.attributes.forecast[14].intensity],
[entity.attributes.forecast[15].from,
entity.attributes.forecast[15].intensity],
[entity.attributes.forecast[16].from,
entity.attributes.forecast[16].intensity],
[entity.attributes.forecast[17].from,
entity.attributes.forecast[17].intensity],
[entity.attributes.forecast[18].from,
entity.attributes.forecast[18].intensity],
[entity.attributes.forecast[19].from,
entity.attributes.forecast[19].intensity],
[entity.attributes.forecast[20].from,
entity.attributes.forecast[20].intensity],
[entity.attributes.forecast[21].from,
entity.attributes.forecast[21].intensity],
[entity.attributes.forecast[22].from,
entity.attributes.forecast[22].intensity],
[entity.attributes.forecast[23].from,
entity.attributes.forecast[23].intensity],
[entity.attributes.forecast[24].from,
entity.attributes.forecast[24].intensity],
[entity.attributes.forecast[25].from,
entity.attributes.forecast[25].intensity],
[entity.attributes.forecast[26].from,
entity.attributes.forecast[26].intensity],
[entity.attributes.forecast[27].from,
entity.attributes.forecast[27].intensity],
[entity.attributes.forecast[28].from,
entity.attributes.forecast[28].intensity],
[entity.attributes.forecast[29].from,
entity.attributes.forecast[29].intensity],
[entity.attributes.forecast[30].from,
entity.attributes.forecast[30].intensity],
[entity.attributes.forecast[31].from,
entity.attributes.forecast[31].intensity],
[entity.attributes.forecast[32].from,
entity.attributes.forecast[32].intensity],
[entity.attributes.forecast[33].from,
entity.attributes.forecast[33].intensity],
[entity.attributes.forecast[34].from,
entity.attributes.forecast[34].intensity],
[entity.attributes.forecast[35].from,
entity.attributes.forecast[35].intensity],
[entity.attributes.forecast[36].from,
entity.attributes.forecast[36].intensity],
[entity.attributes.forecast[37].from,
entity.attributes.forecast[37].intensity],
[entity.attributes.forecast[38].from,
entity.attributes.forecast[38].intensity],
[entity.attributes.forecast[39].from,
entity.attributes.forecast[39].intensity],
[entity.attributes.forecast[40].from,
entity.attributes.forecast[40].intensity],
[entity.attributes.forecast[41].from,
entity.attributes.forecast[41].intensity],
[entity.attributes.forecast[42].from,
entity.attributes.forecast[42].intensity],
[entity.attributes.forecast[43].from,
entity.attributes.forecast[43].intensity],
[entity.attributes.forecast[44].from,
entity.attributes.forecast[44].intensity],
[entity.attributes.forecast[45].from,
entity.attributes.forecast[45].intensity],
[entity.attributes.forecast[46].from,
entity.attributes.forecast[46].intensity],
[entity.attributes.forecast[47].from,
entity.attributes.forecast[47].intensity]];