fredrik_persson_

Energy Card + Graph

Apr 21st, 2023 (edited)
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.45 KB | None | 0 0
  1.      - type: 'custom:button-card'
  2.         view_layout:
  3.           grid-area: 'r4a'
  4.         entity: sensor.monthly_production_round
  5.         tap_action: none
  6.         label: Produktion denna månad
  7.         show_name: false
  8.         show_icon: false
  9.         show_label: true
  10.         show_state: true
  11.         show_units: true
  12.         variables:
  13.           card_color: "var(--ha-card-background)"
  14.           color_theme: "var(--color-green)"
  15.           graph_entity: sensor.daily_production
  16.         styles:
  17.           grid:
  18.             - grid-template-areas: '"s" "l" "graph"'
  19.             - grid-template-rows: 2fr 1fr 3fr
  20.             - row-gap: 6px
  21.           card:
  22.             - height: 100%
  23.             - border-radius: "var(--border-radius)"
  24.             - box-shadow: "var(--border-radius)"
  25.             - padding: 1rem
  26.             - background-color: '[[[ return variables.card_color ]]]'
  27.           state:
  28.             - color: '[[[ return variables.color_theme ]]]'
  29.             - text-align: center
  30.             - font-size: "var(--fs-800)"
  31.             - font-weight: bold
  32.             - justify-self: start
  33.             - align-self: end
  34.           label:
  35.             - color: "var(--color-white)"
  36.             - text-align: center
  37.             - font-size: "var(--fs-400)"
  38.             - justify-self: start
  39.             - align-self: start
  40.           custom_fields:
  41.             graph:
  42.               - justify-self: center
  43.               - align-self: start
  44.         custom_fields:
  45.           graph:
  46.             card:
  47.               type: custom:mini-graph-card
  48.               card_mod:
  49.                 style: |
  50.                  ha-card {
  51.                     background: none;
  52.                     box-shadow: none;
  53.                     border-radius: 0px;
  54.                     padding: 0px;
  55.                     margin: 0px;
  56.                   }
  57.                   ha-card > div{
  58.                     padding: 0 !important;
  59.                   }
  60.               entities:
  61.                - '[[[ return variables.graph_entity ]]]'
  62.               line_color: '[[[ return variables.color_theme ]]]'
  63.               line_width: 4
  64.               hours_to_show: 504
  65.               points_per_hour: .2
  66.               smoothing: true
  67.               group: false
  68.               animate: true
  69.               show:
  70.                 icon: false
  71.                 name: false
  72.                 state: false
  73.                 labels: false
  74.                 points: false
  75.                 fill: false
Advertisement
Add Comment
Please, Sign In to add comment