Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:apexcharts-card
- apex_config:
- tooltip:
- x:
- format: ddd kl. HH
- chart:
- height: 350px
- defaultLocale: da
- locales:
- - name: da
- options:
- shortDays:
- - Søn
- - Man
- - Tir
- - Ons
- - Tor
- - Fre
- - Lør
- xaxis:
- axisTicks:
- offsetX: 0
- offsetY: -3
- labels:
- show: true
- format: HH
- tickAmount: 11
- style:
- fontSize: 10px
- fontWeight: 399
- plotOptions:
- bar:
- dataLabels:
- position: center
- maxItems: 32
- hideOverflowingLabels: true
- orientation: vertical
- columnWidth: 90%
- dataLabels:
- enabled: true
- style:
- fontSize: 10px
- colors:
- - '#fff'
- distributed: true
- background:
- enabled: false
- formatter: |
- EVAL:function(value) {
- return value.toFixed(2);
- }
- all_series_config:
- unit: ' kr.'
- experimental:
- color_threshold: true
- header:
- title: Sammensætning af elpris
- show: true
- standard_format: true
- show_states: false
- colorize_states: true
- stacked: true
- now:
- show: true
- label: Nu
- graph_span: 23h
- span:
- start: day
- offset: '-0h'
- yaxis:
- - min: 0
- max: 4
- apex_config:
- tickAmount: 5
- series:
- - entity: sensor.energi_data_service
- type: line
- name: Total
- data_generator: |
- var today = entity.attributes.raw_today.map((start, index) => {
- return [new Date(start["hour"]).getTime(), entity.attributes.raw_today[index]["price"]];
- });
- if (entity.attributes.tomorrow_valid) {
- var tomorrow = entity.attributes.raw_tomorrow.map((start, index) => {
- return [new Date(start["hour"]).getTime(), entity.attributes.raw_tomorrow[index]["price"]];
- });
- var data = today.concat(tomorrow);
- } else {
- var data = today
- }
- return data;
- float_precision: 2
- show:
- legend_value: false
- in_header: false
- datalabels: false
- extend_to: now
- color_threshold:
- - value: 0
- color: green
- - value: 2
- color: yellow
- - value: 3
- color: orange
- - value: 4
- color: red
- - value: 5
- color: darkred
- - entity: sensor.energi_data_service
- type: column
- name: Elafgift
- color: '#00B0F0'
- data_generator: |
- var afgift = entity.attributes.tariffs.additional_tariffs.elafgift;
- var today = entity.attributes.raw_today.map((start, index) => {
- return [new Date(start["hour"]).getTime(), afgift];
- });
- if (entity.attributes.tomorrow_valid) {
- var tomorrow = entity.attributes.raw_tomorrow.map((start, index) => {
- return [new Date(start["hour"]).getTime(), afgift];
- });
- var data = today.concat(tomorrow);
- } else {
- var data = today
- }
- return data;
- float_precision: 2
- show:
- legend_value: false
- in_header: false
- datalabels: true
- - entity: sensor.energi_data_service
- type: column
- name: Tariffer
- color: '#63666A'
- data_generator: >
- var energinet =
- entity.attributes.tariffs.additional_tariffs.transmissions_nettarif +
- entity.attributes.tariffs.additional_tariffs.systemtarif;
- var today = entity.attributes.raw_today.map((start, index) => {
- return [new Date(start["hour"]).getTime(), entity.attributes.tariffs.tariffs[index]+ energinet];
- });
- if (entity.attributes.tomorrow_valid) {
- var tomorrow = entity.attributes.raw_tomorrow.map((start, index) => {
- return [new Date(start["hour"]).getTime(), entity.attributes.tariffs.tariffs[index]+energinet];
- });
- var data = today.concat(tomorrow);
- } else {
- var data = today
- }
- return data;
- float_precision: 2
- show:
- legend_value: false
- in_header: false
- datalabels: true
- - entity: sensor.energi_data_service
- type: column
- name: Spot
- color: '#92D050'
- data_generator: >
- var afgift = entity.attributes.tariffs.additional_tariffs.elafgift
- +entity.attributes.tariffs.additional_tariffs.transmissions_nettarif +
- entity.attributes.tariffs.additional_tariffs.systemtarif
- var today = entity.attributes.raw_today.map((start, index) => {
- return [new Date(start["hour"]).getTime(), entity.attributes.raw_today[index]["price"] - afgift - entity.attributes.tariffs.tariffs[index]];
- });
- if (entity.attributes.tomorrow_valid) {
- var tomorrow = entity.attributes.raw_tomorrow.map((start, index) => {
- return [new Date(start["hour"]).getTime(), entity.attributes.raw_tomorrow[index]["price"] - afgift - entity.attributes.tariffs.tariffs[index]];
- });
- var data = today.concat(tomorrow);
- } else {
- var data = today
- }
- return data;
- float_precision: 2
- show:
- legend_value: false
- in_header: false
- datalabels: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement