diff --git a/configuration.yaml b/configuration.yaml index 2ff63c5..f36b3b6 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -215,6 +215,15 @@ template: {% set kw = states('sensor.water_heater_power_draw') | float(0) %} {{ (kw * 1000) | round(0) }} + # OCTOPRINT: Most recent print's filament usage (mm), from PrintHistory plugin + - name: "OctoPrint Last Print Filament" + unique_id: octoprint_last_print_filament + unit_of_measurement: "mm" + icon: mdi:spool + state: >- + {% set lengths = state_attr('sensor.octoprint_filament_used_total', 'filamentLength') %} + {{ lengths[-1] | float | round(2) if lengths else 0 }} + # Legacy and Integration Sensor Section sensor: - platform: torque