Control panel now shows total number of layers for 3d printer

This commit is contained in:
2026-01-13 23:12:02 +01:00
parent 08b87a7f0f
commit eafd4b164f

View File

@@ -242,9 +242,17 @@ text_sensor:
then: then:
- lvgl.label.update: - lvgl.label.update:
id: lbl_3dprinter_layer id: lbl_3dprinter_layer
text: text: !lambda |-
format: "Layer: %s" return "Layer: " + x + " of " + id(printer_total_layers).state;
args: [x.c_str()] - platform: homeassistant
entity_id: sensor.k2plus_c06b_total_layers
id: printer_total_layers
on_value:
then:
- lvgl.label.update:
id: lbl_3dprinter_layer
text: !lambda |-
return "Layer: " + id(printer_working_layer).state + " of " + x;
- platform: homeassistant - platform: homeassistant
entity_id: sensor.k2plus_c06b_print_time_left entity_id: sensor.k2plus_c06b_print_time_left
id: printer_print_time_left id: printer_print_time_left