Advertisement
tlse72

Untitled

Aug 26th, 2022
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 6.36 KB | None | 0 0
  1. type: vertical-stack
  2. title: SE1 Dagens & Morgondagens (inkl moms)
  3. cards:
  4.   - type: custom:vertical-stack-in-card
  5.     title: SE1 Dagens timpris
  6.     style: |
  7.      ha-card {
  8.       box-shadow: 2px;
  9.       background: transparent:
  10.       margin: 15px:
  11.       }
  12.     cards:
  13.       - type: custom:apexcharts-card
  14.         now:
  15.           show: true
  16.           label: JUST NU
  17.         graph_span: 24h
  18.         apex_config:
  19.           chart:
  20.             height: 300px
  21.           legend:
  22.             showForSingleSeries: true
  23.           plotOptions:
  24.             bar:
  25.               borderRadius: 2
  26.           yaxis:
  27.             min: 0
  28.             decimalsInFloat: 2
  29.             tickAmount: 10
  30.             forceNiceScale: true
  31.           xaxis:
  32.             labels:
  33.               datetimeFormatter:
  34.                 hour: HH
  35.         all_series_config:
  36.           show:
  37.             offset_in_name: false
  38.         header:
  39.           title: ' '
  40.           show: true
  41.           show_states: true
  42.           colorize_states: true
  43.         span:
  44.           start: day
  45.           offset: +0h
  46.         series:
  47.           - entity: sensor.nordpool_kwh_se1_sek_3_10_025_med_moms
  48.             type: column
  49.             color: orange
  50.             float_precision: 3
  51.             stroke_width: 2
  52.             name: Dagens timpris
  53.             show:
  54.               in_header: false
  55.               legend_value: false
  56.               extremas: true
  57.             data_generator: |
  58.              return entity.attributes.raw_today.map((start, index) => {
  59.                 return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
  60.               });
  61.           - entity: sensor.nordpool_kwh_se1_sek_3_10_025_med_moms
  62.             name: Timpris just nu
  63.             color: orange
  64.             type: column
  65.             show:
  66.               in_chart: false
  67.             float_precision: 3
  68.           - entity: sensor.nordpool_kwh_se1_sek_3_10_025_med_moms
  69.             attribute: average
  70.             type: column
  71.             float_precision: 3
  72.             stroke_width: 2
  73.             name: Dagens Snittpris
  74.             color: blue
  75.             group_by:
  76.               duration: 1d
  77.             show:
  78.               in_chart: false
  79.               legend_value: false
  80.           - entity: sensor.nordpool_kwh_se1_sek_3_10_025_med_moms
  81.             attribute: max
  82.             type: column
  83.             color: red
  84.             float_precision: 3
  85.             stroke_width: 2
  86.             name: Dagens högsta pris
  87.             group_by:
  88.               duration: 1d
  89.             show:
  90.               in_chart: false
  91.               legend_value: false
  92.           - entity: sensor.nordpool_kwh_se1_sek_3_10_025_med_moms
  93.             attribute: min
  94.             type: column
  95.             color: green
  96.             float_precision: 3
  97.             stroke_width: 2
  98.             name: Dagens lägsta pris
  99.             group_by:
  100.               duration: 1d
  101.             show:
  102.               in_chart: false
  103.               legend_value: false
  104.   - type: custom:vertical-stack-in-card
  105.     title: SE1 Morgondagens timpris (släpps runt 14)
  106.     style: |
  107.      ha-card {
  108.       box-shadow: 2px;
  109.       background: transparent:
  110.       margin: 15px:
  111.       }
  112.     cards:
  113.       - type: custom:apexcharts-card
  114.         graph_span: 24h
  115.         color_list:
  116.          - var(--primary-color)
  117.         apex_config:
  118.           chart:
  119.             height: 300px
  120.           legend:
  121.             showForSingleSeries: true
  122.           plotOptions:
  123.             bar:
  124.               borderRadius: 2
  125.           xaxis:
  126.             labels:
  127.               datetimeFormatter:
  128.                 hour: HH
  129.           yaxis:
  130.             min: 0
  131.             decimalsInFloat: 2
  132.             tickAmount: 10
  133.             forceNiceScale: true
  134.         all_series_config:
  135.           show:
  136.             offset_in_name: false
  137.         header:
  138.           title: ' '
  139.           show: true
  140.           show_states: true
  141.           colorize_states: true
  142.         span:
  143.           start: day
  144.           offset: +1d
  145.         series:
  146.           - entity: sensor.nordpool_kwh_se1_sek_3_10_025_med_moms
  147.             type: column
  148.             stroke_width: 2
  149.             float_precision: 3
  150.             name: Morgondagens timpris
  151.             show:
  152.               in_header: false
  153.               legend_value: false
  154.               extremas: true
  155.             data_generator: |
  156.              return entity.attributes.raw_tomorrow.map((start, index) => {
  157.                 return [new Date(start["start"]).getTime(), entity.attributes.raw_tomorrow[index]["value"]];
  158.               });
  159.           - entity: sensor.nordpool_kwh_se1_sek_3_10_025_med_moms
  160.             type: column
  161.             stroke_width: 2
  162.             float_precision: 3
  163.             name: Morgondagens snittpris
  164.             color: blue
  165.             show:
  166.               legend_value: false
  167.               in_chart: false
  168.             group_by:
  169.               func: avg
  170.               duration: 1d
  171.             data_generator: |
  172.              return entity.attributes.raw_tomorrow.map((start, index) => {
  173.                 return [new Date(start["start"]).getTime(), entity.attributes.raw_tomorrow[index]["value"]];
  174.               });
  175.           - entity: sensor.nordpool_kwh_se1_sek_3_10_025_med_moms
  176.             type: column
  177.             color: red
  178.             stroke_width: 2
  179.             float_precision: 3
  180.             name: Morgondagens högsta pris
  181.             show:
  182.               legend_value: false
  183.               in_chart: false
  184.             group_by:
  185.               func: max
  186.               duration: 1d
  187.             data_generator: |
  188.              return entity.attributes.raw_tomorrow.map((start, index) => {
  189.                 return [new Date(start["start"]).getTime(), entity.attributes.raw_tomorrow[index]["value"]];
  190.               });
  191.           - entity: sensor.nordpool_kwh_se1_sek_3_10_025_med_moms
  192.             type: column
  193.             color: green
  194.             stroke_width: 2
  195.             float_precision: 3
  196.             name: Morgondagens lägsta pris
  197.             show:
  198.               legend_value: false
  199.               in_chart: false
  200.             group_by:
  201.               func: min
  202.               duration: 1d
  203.             data_generator: |
  204.              return entity.attributes.raw_tomorrow.map((start, index) => {
  205.                 return [new Date(start["start"]).getTime(), entity.attributes.raw_tomorrow[index]["value"]];
  206.               });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement