I need help to made a Dashboard for my Bambu Lab X2D

Hi there,

I’m totally noob for doing my own dashboard, and i would like to made one for my Bambu Lab X2D.

I found topic, went to a dashboard générator but the X2D is not referenced as known printer.

Thank you

There are integrations for Bambu printers, one of the oldest is from wolfwithsword Bambulab Home Assistant Dashboards

Hi guys, welcome to the forum!

@Angel038-2 : you need to integrate your printer first to be able to address it and use it in your dashboard.
There are quite some examples if you do a search, here in the forum or with your favorite search engine.
This is a thread about the X1C: My Bambu Lab X1C Dashboard & Automations

Thank you for all your answers, i’ve added the Bambulab integration in my HA instance, but widgets are prety basics, i’m looking the X1C integration to see how i can make something cool and functionnal

Hi,
I tried to make my Dashboard, customising the yaml @Nick4 provides, i’m able to have mosts of sensors informations but i don’t know how to have filament color informations, and i want to replace live cam view by the current print picture
here is my yaml, thanks for your help

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-title-card
        title: Bambu Lab X2D
  - type: custom:mod-card
    card:
      camera_view: live
      type: image
      entities: []
      camera_image: x2d_20p6bj650802100_camera
  - type: custom:mod-card
    card_mod:
      style:
        hui-horizontal-stack-card $: |
          div#root > :first-child > * {
            width: 20%;
            flex: auto; 
          }
          div#root > :last-child > * {
            width: 80%;
            flex: auto; 
          }
    card:
      type: horizontal-stack
      cards:
        - type: custom:mushroom-chips-card
          chips:
            - type: template
              entity: sensor.x2d_20p6bj650802100_externalspool2_bobine_externe
              content: EXT.
              card_mod:
                style: |
                  ha-card {
                    background: none !important;
                    border: none;
                    font-size: 4rem !important;
                  }
        - type: custom:mushroom-chips-card
          chips:
            - type: template
              entity: binary_sensor.x2d_20p6bj650802100_ams_1_actif
              content: AMS
              card_mod:
                style: |
                  ha-card {
                    background: none !important;
                    border: none;
                    font-size: 4rem !important;
                  }
            - type: spacer
            - type: entity
              entity: sensor.x2d_20p6bj650802100_ams_1_temperature
            - type: entity
              entity: sensor.x2d_20p6bj650802100_ams_1_humidite
              icon: mdi:water-opacity
  - type: custom:mod-card
    card_mod:
      style:
        hui-horizontal-stack-card $: |
          div#root > :first-child > * {
            width: 20%;
            flex: auto; 
          }
          div#root > :last-child > * {
            width: 80%;
            flex: auto; 
          }
    card:
      type: horizontal-stack
      cards:
        - type: custom:mod-card
          card_mod:
            style: |
              ha-card {
                height: 130px;
                font-size: 10px;
                --external_spool_color: {{state_attr('sensor.x2d_20p6bj650802100_externalspool_external_spool', 'color') }};
                --tray_1_color: {{state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_1', 'color') }};
                --tray_2_color: {{state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_2', 'color') }};
                --tray_3_color: {{state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_3', 'color') }};
                --tray_4_color: {{state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_4', 'color') }};
                --external_spool_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_externalspool2_bobine_externe', 'active', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
                --tray_1_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_1', 'actif', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
                --tray_2_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_2', 'actif', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
                --tray_3_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_3', 'actif', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
                --tray_4_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_4', 'actif', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
              }
          card:
            card_mod:
              style: |
                .entities {
                  align-items: start !important;
                }
            show_name: false
            show_icon: true
            show_state: true
            type: glance
            entities:
              - entity: sensor.x2d_20p6bj650802100_externalspool2_bobine_externe
                icon: mdi:circle-slice-8
                card_mod:
                  style: |
                    :host {
                      --paper-item-icon-color: var(--external_spool_color);
                    }
                    state-badge {
                      background-color: var(--external_spool_bg);
                      border-radius: 50%;
                    }
                    div {
                      white-space: unset !important;
                      text-wrap: balance !important;
                    }
        - type: custom:mod-card
          card_mod:
            style: |
              ha-card {
                font-size: 10px;
                --external_spool_color: {{state_attr('sensor.x2d_20p6bj650802100_externalspool2_bobine_externe', 'color') }};
                --tray_1_color: {{state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_1', 'color') }};
                --tray_2_color: {{state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_2', 'color') }};
                --tray_3_color: {{state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_3', 'color') }};
                --tray_4_color: {{state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_4', 'color') }};
                --external_spool_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_externalspool2_bobine_externe', 'active', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
                --tray_1_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_1', 'active', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
                --tray_2_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_2', 'active', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
                --tray_3_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_3', 'active', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
                --tray_4_bg: {% if is_state_attr('sensor.x2d_20p6bj650802100_ams_1_emplacement_4', 'active', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
              }
          card:
            card_mod:
              style: |
                .entities {
                  align-items: start !important;
                }
            show_name: false
            show_icon: true
            show_state: true
            type: glance
            entities:
              - entity: sensor.x2d_20p6bj650802100_ams_1_emplacement_1
                icon: mdi:circle-slice-8
                card_mod:
                  style: |
                    :host {
                      --paper-item-icon-color: var(--tray_1_color);
                    }
                    state-badge {
                      background-color: var(--tray_1_bg);
                      border-radius: 50%;
                    }
                    div {
                      white-space: unset !important;
                      text-wrap: balance !important;
                    }
              - entity: sensor.x2d_20p6bj650802100_ams_1_emplacement_2
                icon: mdi:circle-slice-8
                card_mod:
                  style: |
                    :host {
                      --paper-item-icon-color: var(--tray_2_color);
                    }
                    state-badge {
                      background-color: var(--tray_2_bg);
                      border-radius: 50%;
                    }
                    div {
                      white-space: unset !important;
                      text-wrap: balance !important;
                    }
              - entity: sensor.x2d_20p6bj650802100_ams_1_emplacement_3
                icon: mdi:circle-slice-8
                card_mod:
                  style: |
                    :host {
                      --paper-item-icon-color: var(--tray_3_color);
                    }
                    state-badge {
                      background-color: var(--tray_3_bg);
                      border-radius: 50%;
                    }
                    div {
                      white-space: unset !important;
                      text-wrap: balance !important;
                    }
              - entity: sensor.x2d_20p6bj650802100_ams_1_emplacement_4
                icon: mdi:circle-slice-8
                card_mod:
                  style: |
                    :host {
                      --paper-item-icon-color: var(--tray_4_color);
                    }
                    state-badge {
                      background-color: var(--tray_4_bg);
                      border-radius: 50%;
                    }
                    div {
                      white-space: unset !important;
                      text-wrap: balance !important;
                    }
  - type: custom:mod-card
    card:
      type: custom:mushroom-chips-card
      chips:
        - type: template
          entity: binary_sensor.x2d_20p6bj650802100_en_ligne
          content: Printer
          card_mod:
            style: |
              ha-card {
                background: none !important;
                border: none;
                font-size: 4rem !important;
              }
        - type: spacer
        - type: entity
          entity: sensor.x2d_20p6bj650802100_etape_actuelle
        - type: light
          icon: mdi:lightbulb
          entity: light.x2d_20p6bj650802100_lumiere_de_la_chambre
        - type: entity
          entity: sensor.x2d_20p6bj650802100_signal_wi_fi
        - type: entity
          entity: binary_sensor.x2d_20p6bj650802100_erreurs_hms
          icon: mdi:alert-circle
  - type: custom:mod-card
    card:
      show_name: false
      show_icon: true
      show_state: true
      type: glance
      entities:
        - entity: sensor.x2d_20p6bj650802100_temperature_de_la_buse
          icon: mdi:printer-3d-nozzle-heat
        - entity: sensor.x2d_20p6bj650802100_temperature_du_lit
          icon: mdi:train-car-flatbed
        - entity: sensor.x2d_20p6bj650802100_temperature_de_la_chambre
          icon: mdi:minus-box-outline
        - entity: sensor.x2d_20p6bj650802100_profil_de_vitesse
      state_color: false
  - type: custom:mod-card
    card:
      type: custom:timer-bar-card
      entities:
        - entity: sensor.x2d_20p6bj650802100_progression_de_l_impression
          guess_mode: true
          active_icon: mdi:printer-3d
          start_time:
            entity: sensor.x2d_20p6bj650802100_heure_de_debut
          end_time:
            entity: sensor.x2d_20p6bj650802100_heure_de_fin
      layout: full_row
      text_width: 0px
      mushroom: null
  - type: custom:mushroom-chips-card
    chips:
      - type: entity
        entity: sensor.x2d_20p6bj650802100_progression_de_l_impression
      - type: entity
        entity: sensor.x2d_20p6bj650802100_heure_de_fin
      - type: entity
        entity: sensor.x2d_20p6bj650802100_temps_restant
    alignment: justify

Is that information (filament color) available by the integration, in other words: do you have something related to that in your HA?

Open your Home Assistant instance and show your state developer tools.

@Nick4 i think you put the finger on one thing, i don’t found any entity with that informations…
correction with the Dev Tool you sent , i found these informations:

This should be #f95d73ff

image

Yes it was, but, how can i take this information in my yaml script to show filament colors?
This is what i have for now

Take a look here: Community guides - templating

In
Open your Home Assistant instance and show your state developer tools.

{{ state_attr('entity', 'attributes') }}

Hi,
Thank you for your advise, i tried but nothing change, i can see in the code éditor, the good value is detected, but not showed, i don’t know how to do

What are you trying to achieve?
Show what you have.

i modify in the Yaml, the values name, either color or cols nothing brings me the curent filament color on the dashboard.

If the entity value changes and represents the current color being used, it’s a matter of using that in a card.

You are not making it easy for others to help when not answering questions…

This use of - type: custom:mod-card is aged and not really reccomended.

Where are you referencing your Dashboard code?