Skip to content

Instantly share code, notes, and snippets.

@rursache
Forked from bbbenji/bambu_lab-lovelace.yaml
Created January 3, 2024 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rursache/8a4131422a2c7cc19b9bf2f50e8b026d to your computer and use it in GitHub Desktop.
Save rursache/8a4131422a2c7cc19b9bf2f50e8b026d to your computer and use it in GitHub Desktop.
Bambu Lab X1C Lovelace Dashboard
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-title-card
title: Bambu Lab X1C
alignment: start
- type: custom:mod-card
card:
type: custom:mushroom-chips-card
chips:
- type: entity
entity: button.x1c_00m09a341101189_stop_printing
icon: mdi:stop
content_info: false
- type: entity
entity: button.x1c_00m09a341101189_pause_printing
icon: mdi:pause
content_info: false
- type: entity
entity: button.x1c_00m09a341101189_resume_printing
icon: mdi:play
content_info: false
card_mod:
style: |
ha-card {
display: flex;
justify-content: end;
align-items: center;
height: 80px;
}
- type: custom:mod-card
card:
camera_view: live
type: picture-glance
entities: []
camera_image: camera.x1c_00m09a341101189_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: binary_sensor.x1c_00m09a341101189_online
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.x1c_00m09a341101189_online
content: AMS
card_mod:
style: |
ha-card {
background: none !important;
border: none;
font-size: 4rem !important;
}
- type: spacer
- type: entity
entity: sensor.x1c_00m09a341101189_ams_1_temperature
- type: entity
entity: sensor.x1c_00m09a341101189_ams_1_humidity_index
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 {
font-size: 10px;
--external_spool_color: {{state_attr('sensor.x1c_00m09a341101189_externalspool_external_spool', 'color') }};
--tray_1_color: {{state_attr('sensor.x1c_00m09a341101189_ams_1_tray_1', 'color') }};
--tray_2_color: {{state_attr('sensor.x1c_00m09a341101189_ams_1_tray_2', 'color') }};
--tray_3_color: {{state_attr('sensor.x1c_00m09a341101189_ams_1_tray_3', 'color') }};
--tray_4_color: {{state_attr('sensor.x1c_00m09a341101189_ams_1_tray_4', 'color') }};
--external_spool_bg: {% if is_state_attr('sensor.x1c_00m09a341101189_externalspool_external_spool', 'active', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
--tray_1_bg: {% if is_state_attr('sensor.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_externalspool_external_spool
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.x1c_00m09a341101189_externalspool_external_spool', 'color') }};
--tray_1_color: {{state_attr('sensor.x1c_00m09a341101189_ams_1_tray_1', 'color') }};
--tray_2_color: {{state_attr('sensor.x1c_00m09a341101189_ams_1_tray_2', 'color') }};
--tray_3_color: {{state_attr('sensor.x1c_00m09a341101189_ams_1_tray_3', 'color') }};
--tray_4_color: {{state_attr('sensor.x1c_00m09a341101189_ams_1_tray_4', 'color') }};
--external_spool_bg: {% if is_state_attr('sensor.x1c_00m09a341101189_externalspool_external_spool', 'active', true) %} rgba(255,254,249, 0.25); {% else %} rgba(111,111,111, 0.2) {% endif %};
--tray_1_bg: {% if is_state_attr('sensor.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_ams_1_tray_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.x1c_00m09a341101189_online
content: Printer
card_mod:
style: |
ha-card {
background: none !important;
border: none;
font-size: 4rem !important;
}
- type: spacer
- type: entity
entity: sensor.x1c_00m09a341101189_current_stage
- type: light
icon: mdi:lightbulb
entity: light.x1c_00m09a341101189_chamber_light
- type: entity
entity: sensor.x1c_00m09a341101189_wi_fi_signal
- type: entity
entity: binary_sensor.x1c_00m09a341101189_hms_errors
icon: mdi:alert-circle
- type: custom:mod-card
card:
show_name: false
show_icon: true
show_state: true
type: glance
entities:
- entity: sensor.x1c_00m09a341101189_nozzle_temperature
icon: mdi:printer-3d-nozzle-heat
- entity: sensor.x1c_00m09a341101189_bed_temperature
icon: mdi:train-car-flatbed
- entity: sensor.x1c_00m09a341101189_chamber_temperature
icon: mdi:minus-box-outline
- entity: sensor.x1c_00m09a341101189_speed_profile
state_color: false
- type: custom:mod-card
card:
type: custom:timer-bar-card
entities:
- entity: sensor.x1c_00m09a341101189_print_progress
guess_mode: true
active_icon: mdi:printer-3d
start_time:
entity: sensor.x1c_00m09a341101189_start_time
end_time:
entity: sensor.x1c_00m09a341101189_end_time
layout: full_row
text_width: 0px
mushroom: null
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.x1c_00m09a341101189_print_progress
- type: entity
entity: sensor.x1c_00m09a341101189_end_time
- type: entity
entity: sensor.x1c_00m09a341101189_remaining_time
alignment: justify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment