configuration.yaml, zigbee2mqtt/state.json
This commit is contained in:
@@ -224,6 +224,21 @@ template:
|
||||
{% set lengths = state_attr('sensor.octoprint_filament_used_total', 'filamentLength') %}
|
||||
{{ lengths[-1] | float | round(2) if lengths else 0 }}
|
||||
|
||||
# OCTOPRINT Z: Holds the last non-zero Z value (raw currentZ reports 0 when idle)
|
||||
- triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.octoprint_current_z
|
||||
sensor:
|
||||
- name: "OctoPrint Z Position"
|
||||
unique_id: octoprint_z_position_held
|
||||
unit_of_measurement: "mm"
|
||||
device_class: distance
|
||||
state_class: measurement
|
||||
icon: mdi:axis-z-arrow
|
||||
state: >-
|
||||
{% set z = states('sensor.octoprint_current_z') | float(0) %}
|
||||
{{ z if z > 0 else this.state }}
|
||||
|
||||
# Legacy and Integration Sensor Section
|
||||
sensor:
|
||||
- platform: torque
|
||||
|
||||
Reference in New Issue
Block a user