badges: []
cards:
  - cards:
#        - cards:
        - entities:
            - entity: sensor.maximetro
              color_thresholds:
                - value: 1000
                  color: "#AEC622"
                - value: 1500
                  color: "#DEA50D"
                - value: 2500
                  color: "#FF0000"
          aggregate_func: max
          show:
            state: true
            labels: true
            extrema: false
            average: false
          line_width: 1
          name: Maximetro
          icon: mdi:electron-framework
          hours_to_show: 24
          points_per_hour: 4
          type: 'custom:mini-graph-card'
        - entities:
            - entity: sensor.maximetro
              color_thresholds:
                - value: 1000
                  color: "#AEC622"
                - value: 1500
                  color: "#DEA50D"
                - value: 2500
                  color: "#FF0000"
          aggregate_func: max
          show:
            name: false
            icon: false
            state: false
            labels: true
            extrema: false
            average: false
          line_width: 1
          name: Maximetro
          icon: mdi:electron-framework
          hours_to_show: 1
          points_per_hour: 60
          type: 'custom:mini-graph-card'
#        - entities:
#            - entity: sensor.consumo_general
#              color_thresholds:
#                - value: 1000
#                  color: "#f39c12"
#                - value: 2000
#                  color: "#d35400"
#                - value: 3000
#                  color: "#c0392b"
 #         show:
 #           labels: true
 #           extrema: true
 #           average: true
 #         line_width: 1
 #         name: Consumo
 #         icon: mdi:electron-framework
 #         hours_to_show: 24
 #         points_per_hour: 6
 #         type: 'custom:mini-graph-card'
        - break
        - entities:
            - entity: sensor.consumo_calefaccion
              name: Calefacción
            - entity: sensor.consumo_luces
              name: Luces
            - entity: sensor.consumo_persianas
              name: Persianas
            - entity: sensor.consumo_coche_electrico
              name: Coche
            - entity: sensor.consumo_horno
              name: Horno
            - entity: sensor.consumo_nevera
              name: Nevera
            - entity: sensor.consumo_lavavajillas
              name: Lavavajillas
            - entity: sensor.consumo_lavadora
              name: Lavadora
            - entity: sensor.consumo_varios_1
              name: Varios 1
            - entity: sensor.consumo_varios_2
              name: Varios 2
            - entity: sensor.consumo_humedos
              name: Humedos
          name: Dispositivos
          icon: mdi:electron-framework
          show:
            labels: true
          line_width: 1
          hours_to_show: 24
          points_per_hour: 4
          tap_action: none
          type: 'custom:mini-graph-card'
#            - entity: sensor.consumo_general
#              max: 3400
#              min: 0
#              name: Consumo Actual
#              severity:
#                green: 200
#                red: 3000
#                yellow: 1000
#              theme: default
#              type: gauge
#              unit: W
#            - entities:
#                - entities:
#                    - sensor.consumo_general
#                  hours_to_show: 24
#                  type: 'custom:hui-history-graph-card'
#                - entity: sensor.consumo_general_factor_potencia
#                  name: Factor Potencia
#                  primary:
#                    entity: sensor.consumo_general_potencia_activa 
#                    name: Activa
#                  secondary:
#                    entity: sensor.consumo_general_potencia_reactiva
#                    name: Reactiva
#                  hide_state: true
#                  type: 'custom:multiple-entity-row'
#              head: sensor.consumo_general_amperios
#              type: 'custom:fold-entity-row'
#          type: vertical-stack
        - entities:
            - entity: sensor.consumo_calefaccion
              name: Calefacción
            - entity: sensor.consumo_coche_electrico
              name: Coche
            - entity: sensor.consumo_luces
              name: Luces
            - entity: sensor.consumo_persianas
              name: Persianas
            - entity: sensor.consumo_horno
              name: Horno
            - entity: sensor.consumo_nevera
              name: Nevera
            - entity: sensor.consumo_humedos
              name: Humedos
            - entity: sensor.consumo_lavavajillas
              name: Lavavajillas
            - entity: sensor.consumo_lavadora
              name: Lavadora
            - entity: sensor.consumo_varios_1
              name: UV1
            - entity: sensor.consumo_varios_2
              name: UV2
          hours_to_show: 12
          refresh_interval: 60
          title: Consumos
          type: history-graph
        - entities:
            - entity: sensor.consumo_diario_general
              primary:
                entity: sensor.coste_consumo_diario
                name: Diario
              secondary:
                entity: sensor.coste_consumo_mensual
                name: Mensual
              type: 'custom:multiple-entity-row'
          type: entities
          show_header_toggle: false
          title: Datos Generales de Consumo
        - entities:
            - entity: input_number.potencia
          type: entities
          show_header_toggle: false

#        - entities:
#            - entity: sensor.consumo_varios_1
#              primary:
#                entity: sensor.consumo_diario_varios_1
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_varios_1
#                name: Integración
#              type: 'custom:multiple-entity-row'
#            - entity: sensor.consumo_varios_2
#              primary:
#                entity: sensor.consumo_diario_varios_2
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_varios_2
#                name: Integración
#              type: 'custom:multiple-entity-row' 
#            - entity: sensor.consumo_humedos
#              primary:
#                entity: sensor.consumo_diario_humedos
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_humedos
#                name: Integración
#              type: 'custom:multiple-entity-row'
#            - entity: sensor.consumo_horno
#              primary:
#                entity: sensor.consumo_diario_horno
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_horno
#                name: Integración
#              type: 'custom:multiple-entity-row'
#            - entity: sensor.consumo_nevera
#              primary:
#                entity: sensor.consumo_diario_nevera
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_nevera
#                name: Integración
#              type: 'custom:multiple-entity-row'
#            - entity: sensor.consumo_lavavajillas
#              primary:
#                entity: sensor.consumo_diario_lavavajillas
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_lavavajillas
#                name: Integración
#              type: 'custom:multiple-entity-row'
#            - entity: sensor.consumo_lavadora
#              primary:
#                entity: sensor.consumo_diario_lavadora
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_lavadora
#                name: Integración
#              type: 'custom:multiple-entity-row'
#            - entity: sensor.consumo_calefaccion
#              primary:
#                entity: sensor.consumo_diario_calefaccion
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_calefaccion
#                name: Integración
#              type: 'custom:multiple-entity-row'
#            - entity: sensor.consumo_luces
#              primary:
#                entity: sensor.consumo_diario_luces
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_luces
#                name: Integración
#              type: 'custom:multiple-entity-row'
#            - entity: sensor.consumo_persianas
#              primary:
#                entity: sensor.consumo_diario_persianas
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_persianas
#                name: Integración
#              type: 'custom:multiple-entity-row'
#            - entity: sensor.consumo_coche_electrico
#              primary:
#                entity: sensor.consumo_diario_coche_electrico
#                name: Diario
#              secondary:
#                entity: sensor.consumo_diario_integracion_coche_electrico
#                name: Integración
#              type: 'custom:multiple-entity-row'
#          type: entities
#          show_header_toggle: false
#          title: Consumos Varios
#        - entities:
#            - sensor.coste_consumo_diario
#            - sensor.coste_consumo_mensual
#            - sensor.consumo_general
#            - sensor.maximetro
#            - sensor.consumo_integrado_general
#            - sensor.periodo_consumo_diario_general_punta
#            - sensor.periodo_consumo_diario_general_valle
#            - sensor.periodo_consumo_mensual_general_punta
#            - sensor.periodo_consumo_mensual_general_valle
#            - sensor.consumo_diario_general
#            - sensor.consumo_mensual_general
#          type: entities
    layout: vertical
    type: "custom:layout-card"    
icon: 'mdi:gauge'
path: consumos
panel: true
title: Consumos

