configuration.yaml, zigbee2mqtt/state.json
This commit is contained in:
@@ -243,6 +243,15 @@ template:
|
||||
{% set total = fm.get('total', {}) if fm else {} %}
|
||||
{{ total.get('usedLength', 0) | float | round(2) }}
|
||||
|
||||
# OCTOPRINT HEIGHT WIDGET: clean rounded state + total attribute for companion widget
|
||||
- name: "OctoPrint Height Progress Clean"
|
||||
unique_id: octoprint_height_progress_clean
|
||||
unit_of_measurement: "mm"
|
||||
device_class: distance
|
||||
state: "{{ states('sensor.octoprint_height_progress') | float(0) | round(1) }}"
|
||||
attributes:
|
||||
total: "{{ (state_attr('sensor.octoprint_height_progress', 'total') | float(0)) | round(1) }}"
|
||||
|
||||
# Legacy and Integration Sensor Section
|
||||
sensor:
|
||||
- platform: torque
|
||||
|
||||
Reference in New Issue
Block a user