Advertisement
gio_aggiustatutto

Dashboard YAML configuration

Oct 15th, 2024 (edited)
987
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 9.12 KB | None | 0 0
  1. views:
  2. - title: Energy
  3.     path: energy
  4.     icon: mdi:lightning-bolt
  5.     subview: false
  6.     cards:
  7.       - square: false
  8.         type: grid
  9.         cards:
  10.           - type: custom:mushroom-template-card
  11.             primary: '{{ states(entity) }} W'
  12.             secondary: Power
  13.             icon: mdi:lightning-bolt
  14.             layout: vertical
  15.             entity: sensor.energy_meter_power_1
  16.             icon_color: 255, 87, 34
  17.             double_tap_action:
  18.               action: none
  19.             hold_action:
  20.               action: none
  21.             tap_action:
  22.               action: none
  23.           - type: custom:mushroom-template-card
  24.             primary: '{{ states(entity) }} A'
  25.             secondary: Current
  26.             icon: mdi:current-ac
  27.             layout: vertical
  28.             entity: sensor.energy_meter_current_1
  29.             icon_color: 255, 87, 34
  30.             double_tap_action:
  31.               action: none
  32.             hold_action:
  33.               action: none
  34.             tap_action:
  35.               action: none
  36.           - type: custom:mushroom-template-card
  37.             primary: '{{ states(entity) }} V'
  38.             secondary: Voltage
  39.             icon: mdi:alpha-v-box-outline
  40.             layout: vertical
  41.             entity: sensor.energy_meter_voltage
  42.             icon_color: 255, 87, 34
  43.             double_tap_action:
  44.               action: none
  45.             hold_action:
  46.               action: none
  47.             tap_action:
  48.               action: none
  49.         columns: 3
  50.       - square: false
  51.         type: grid
  52.         cards:
  53.           - type: custom:mushroom-template-card
  54.             primary: '{{ states(entity) }} Hz'
  55.             secondary: Frequency
  56.             icon: mdi:sine-wave
  57.             layout: horizontal
  58.             entity: sensor.energy_meter_frequency
  59.             icon_color: 255, 87, 34
  60.             double_tap_action:
  61.               action: none
  62.             hold_action:
  63.               action: none
  64.             tap_action:
  65.               action: none
  66.           - type: custom:mushroom-template-card
  67.             primary: '{{ states(entity) }}'
  68.             secondary: Power factor
  69.             icon: mdi:alpha-p-box-outline
  70.             layout: horizontal
  71.             entity: sensor.energy_meter_power_factor_1
  72.             icon_color: 255, 87, 34
  73.             double_tap_action:
  74.               action: none
  75.             hold_action:
  76.               action: none
  77.             tap_action:
  78.               action: none
  79.         columns: 2
  80.       - type: custom:vertical-stack-in-card
  81.         cards:
  82.           - type: horizontal-stack
  83.             cards:
  84.               - type: custom:mushroom-template-card
  85.                 entity: sensor.energy_consumption_week
  86.                 primary: Week
  87.                 secondary: '{{ states(entity) }} kWh'
  88.                 icon: mdi:lightning-bolt
  89.                 icon_color: 255, 141, 38
  90.                 tap_action:
  91.                   action: none
  92.                 hold_action:
  93.                   action: none
  94.                 double_tap_action:
  95.                   action: none
  96.                 card_mod:
  97.                   style: |
  98.                    ha-card {
  99.                       margin-bottom: -10px;
  100.                     }
  101.               - type: custom:mushroom-template-card
  102.                 entity: sensor.energy_consumption_24h
  103.                 primary: Today
  104.                 secondary: '{{ states(entity) }} kWh'
  105.                 icon: mdi:lightning-bolt
  106.                 icon_color: 255, 141, 38
  107.                 tap_action:
  108.                   action: none
  109.                 hold_action:
  110.                   action: none
  111.                 double_tap_action:
  112.                   action: none
  113.                 card_mod:
  114.                   style: |
  115.                    ha-card {
  116.                       margin-bottom: -10px;
  117.                     }
  118.           - type: custom:apexcharts-card
  119.             apex_config:
  120.               chart:
  121.                 height: 250px
  122.             graph_span: 7d
  123.             yaxis:
  124.               - id: first
  125.                 decimals: 1
  126.                 min: 0
  127.                 apex_config:
  128.                   tickAmount: 4
  129.             series:
  130.               - entity: sensor.energy_consumption_24h
  131.                 fill_raw: last
  132.                 group_by:
  133.                   func: diff
  134.                   duration: 1d
  135.                 show:
  136.                   datalabels: false
  137.                 statistics:
  138.                   period: hour
  139.                   type: sum
  140.                   align: start
  141.                 type: column
  142.             span:
  143.               start: day
  144.               offset: '-6d'
  145.             card_mod:
  146.               style: |
  147.                ha-card {
  148.                   border-radius: 12px;
  149.                   box-shadow: none;
  150.                  
  151.       - type: custom:vertical-stack-in-card
  152.         cards:
  153.           - type: horizontal-stack
  154.             cards:
  155.               - type: custom:mushroom-template-card
  156.                 entity: sensor.energy_consumption_max_24h
  157.                 primary: Peak 24H
  158.                 secondary: '{{ states(entity) }} W'
  159.                 icon: mdi:trending-up
  160.                 icon_color: 255, 141, 38
  161.                 tap_action:
  162.                   action: none
  163.                 hold_action:
  164.                   action: none
  165.                 double_tap_action:
  166.                   action: none
  167.                 card_mod:
  168.                   style: |
  169.                    ha-card {
  170.                       margin-bottom: -10px;
  171.                     }
  172.               - type: custom:mushroom-template-card
  173.                 entity: sensor.energy_consumption_min_24h
  174.                 primary: Min 24H
  175.                 secondary: '{{ states(entity) }} W'
  176.                 icon: mdi:trending-down
  177.                 icon_color: 255, 141, 38
  178.                 tap_action:
  179.                   action: none
  180.                 hold_action:
  181.                   action: none
  182.                 double_tap_action:
  183.                   action: none
  184.                 card_mod:
  185.                   style: |
  186.                    ha-card {
  187.                       margin-bottom: -10px;
  188.                     }
  189.           - type: custom:apexcharts-card
  190.             apex_config:
  191.               chart:
  192.                 height: 250px
  193.             graph_span: 1d
  194.             yaxis:
  195.               - id: first
  196.                 decimals: 2
  197.                 min: 0
  198.                 apex_config:
  199.                   tickAmount: 4
  200.             series:
  201.               - entity: sensor.energy_meter_energy_1
  202.                 fill_raw: last
  203.                 statistics:
  204.                   period: hour
  205.                   type: change
  206.                   align: start
  207.                 type: column
  208.             span:
  209.               offset: '-1h'
  210.             card_mod:
  211.               style: |
  212.                ha-card {
  213.                   border-radius: 12px;
  214.                   box-shadow: none;
  215.                  
  216.       - type: custom:vertical-stack-in-card
  217.         cards:
  218.           - type: horizontal-stack
  219.             cards:
  220.               - type: custom:mushroom-template-card
  221.                 entity: sensor.energy_consumption_month
  222.                 primary: Month
  223.                 secondary: '{{ states(entity) }} kWh'
  224.                 icon: mdi:lightning-bolt
  225.                 icon_color: 255, 141, 38
  226.                 tap_action:
  227.                   action: none
  228.                 hold_action:
  229.                   action: none
  230.                 double_tap_action:
  231.                   action: none
  232.                 card_mod:
  233.                   style: |
  234.                    ha-card {
  235.                       margin-bottom: -10px;
  236.                     }
  237.               - type: custom:mushroom-template-card
  238.                 entity: sensor.energy_consumption_year
  239.                 primary: Year
  240.                 secondary: '{{ states(entity) }} kWh'
  241.                 icon: mdi:lightning-bolt
  242.                 icon_color: 255, 141, 38
  243.                 tap_action:
  244.                   action: none
  245.                 hold_action:
  246.                   action: none
  247.                 double_tap_action:
  248.                   action: none
  249.                 card_mod:
  250.                   style: |
  251.                    ha-card {
  252.                       margin-bottom: -10px;
  253.                     }
  254.           - type: custom:apexcharts-card
  255.             apex_config:
  256.               chart:
  257.                 height: 250px
  258.             graph_span: 365d
  259.             yaxis:
  260.               - id: first
  261.                 decimals: 1
  262.                 min: 0
  263.                 apex_config:
  264.                   tickAmount: 4
  265.             series:
  266.               - entity: sensor.energy_consumption_24h
  267.                 fill_raw: last
  268.                 group_by:
  269.                   func: diff
  270.                   duration: 1d
  271.                 show:
  272.                   datalabels: false
  273.                 statistics:
  274.                   period: hour
  275.                   type: sum
  276.                   align: start
  277.                 type: line
  278.             span:
  279.               start: day
  280.               offset: '-364d'
  281.             card_mod:
  282.               style: |
  283.                ha-card {
  284.                   border-radius: 12px;
  285.                   box-shadow: none;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement