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: 300px
- 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:
- columnWidth: 90
- all_series_config:
- unit: ' kr.'
- experimental:
- color_threshold: true
- header:
- title: Elpriser pr. time (kr/kWh)
- show: true
- standard_format: true
- show_states: false
- colorize_states: true
- graph_span: 2d
- stacked: true
- now:
- show: true
- label: Nu
- span:
- start: day
- offset: '-0h'
- yaxis:
- - min: 0
- max: 4
- apex_config:
- tickAmount: 5
- series:
- - entity: sensor.elpriser_inkl_afgifter
- type: column
- color: orange
- name: Afgifter
- data_generator: |
- var today = entity.attributes.raw_today.map((start, index) => {
- return [new Date(start["hour"]).getTime()+180000, entity.attributes.raw_today[index]["price"]-hass.states['sensor.elpriser_excl_afgifter'].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()+180000, entity.attributes.raw_tomorrow[index]["price"]-hass.states['sensor.elpriser_excl_afgifter'].attributes.raw_tomorrow[index]["price"]];
- });
- var data = today.concat(tomorrow);
- } else {
- var data = today
- }
- return data;
- float_precision: 2
- show:
- legend_value: false
- - entity: sensor.elpriser_excl_afgifter
- type: column
- name: Spot
- data_generator: |
- var today = entity.attributes.raw_today.map((start, index) => {
- return [new Date(start["hour"]).getTime()+180000, 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()+180000, entity.attributes.raw_tomorrow[index]["price"]];
- });
- var data = today.concat(tomorrow);
- } else {
- var data = today
- }
- return data;
- float_precision: 2
- show:
- legend_value: false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement