Vertical Stack In Card

MagicKalen

New member
Hi zusammen,

ich habe versucht mir diesen Code für die Karte auf meine Bedürfnisse anzupassen.
Das ganze sieht jetzt so aus:

1746810677040.png

Ich würde aber gerne selbst Namen für die einzelnen Zeilen festlegen, die Entitätennamen sind hier nicht so hilfreich.
Auch die Dezimalstellen lassen sich nicht ändern, auch wenn man den Eintrag "decimals" ändert.

Jemand eine Ahnung wie sich das machen lässt?

Code:
type: custom:vertical-stack-in-card
cards:
  - type: custom:bar-card
    card_mod:
      style: |
        ha-card {
          border: none !important;
          border-radius: 0px !important;
        }
    name: Aktueller Strombedarf
    positions:
      name: inside
      value: inside
      indicator: "off"
      icon: "off"
    unit_of_measurement: W
    max: 2500
    height: 30px
    severity:
      - color: "#7bc13c"
        from: 0
        to: 50
      - color: "#c1bb3c"
        from: 50
        to: 340
      - color: orange
        from: 340
        to: 500
      - color: darkorange
        from: 500
        to: 1000
      - color: "#ff0000"
        from: 1000
        to: 50000
    entities:
      - entity: sensor.shelly_pro_3em_gesamtverbrauch_total_active_power
  - type: custom:auto-entities
    card_mod:
      style: |
        ha-card {
          background-color: transparent !important;
          border: none !important;
          border-radius: 0px !important;
        }
    card:
      type: custom:bar-card
      card_mod:
        style: |
          ha-card {
            border: none !important;
            border-radius: 0px !important;
          }
      positions:
        name: inside
        value: inside
        indicator: "off"
        icon: "off"
      unit_of_measurement: W
      max: 1000
      severity:
        - color: "#7bc13c"
          from: 0
          to: 50
        - color: "#c1bb3c"
          from: 50
          to: 200
        - color: orange
          from: 200
          to: 500
        - color: darkorange
          from: 500
          to: 1400
        - color: "#ff0000"
          from: 1400
          to: 50000
      height: 30px
      decimals: 2
      style: |
        #states { padding: 0 }
        bar-card-name, bar-card-value {
          color: #ffffff;
        }
        bar-card-value {
          font-weight: bold;
        }
        bar-card-indicator {
          transform: scaleY(-1);
        }
      stack: vertical
      direction: right
    filter:
      include:
        - entity_id: sensor.shelly_pro_em_verbrauch_l1_gs_wz_em0_power
        - entity_id: sensor.shelly_pro_em_verbrauch_l2_wm_sz_kz_balkon_em0_power
        - entity_id: sensor.shelly_plug_kuche_kuhlschrank_switch_0_power
        - entity_id: sensor.eve_energy_klima_leistung_2
        - entity_id: sensor.shelly_plug_wz_computer_switch_0_power
        - entity_id: sensor.eve_energy_drucker_leistung_2
        - entity_id: sensor.shelly_plug_wz_multimedia_switch_0_power
        - entity_id: sensor.shelly_plug_wz_router_beestation_fp_cam_switch_0_power
        - entity_id: sensor.eve_energy_sz_tv_leistung_2
        - entity_id: sensor.shelly_plug_ha_green_hue_bridge_switch_switch_0_power
        - entity_id: sensor.shelly_pro_em_verbrauch_l1_gs_wz_em1_power
        - entity_id: sensor.shelly_pro_em_verbrauch_l2_wm_sz_kz_balkon_em1_power
        - entity_id: sensor.shelly_pro_em_verbrauch_l3_kuche_vz_bad_wc_em0_power
        - entity_id: sensor.shelly_pro_em_verbrauch_l3_kuche_vz_bad_wc_em1_power
      exclude:
        - state: < 0
    sort:
      method: state
      numeric: true
      reverse: true
card_mod:
  style: |
    ha-card {
      background-color: transparent !important;   
      box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px
                  13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset !important;
      border: none;
    }
 
selbst Namen für die einzelnen Zeilen festlegen
Die kannst Du pro Entität angeben über 'options' und 'name':
YAML:
    filter:
      include:
        - entity_id: sensor.shelly_pro_em_verbrauch_l1_gs_wz_em0_power
          options:
            name: 'Ein anderer Name'
bzw. im visuellen Editor für jeden Eintrag als name: Wert angeben:
1747043050470.png
 

Zurzeit aktive Besucher

Neueste Beiträge

Letzte Anleitungen

Statistik des Forums

Themen
6.665
Beiträge
63.942
Mitglieder
6.921
Neuestes Mitglied
Brendianer
Zurück
Oben