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

@@ -238,13 +238,21 @@ text_sensor:
- platform: homeassistant
entity_id: sensor.k2plus_c06b_working_layer
id: printer_working_layer
on_value:
on_value:
then:
- lvgl.label.update:
id: lbl_3dprinter_layer
text:
format: "Layer: %s"
args: [x.c_str()]
text: !lambda |-
return "Layer: " + x + " of " + id(printer_total_layers).state;
- 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
entity_id: sensor.k2plus_c06b_print_time_left
id: printer_print_time_left