configuration.yaml, zigbee2mqtt/state.json
This commit is contained in:
@@ -293,6 +293,41 @@ rest:
|
||||
{{ value_json.allPrintJobs | length }}
|
||||
json_attributes:
|
||||
- "allPrintJobs"
|
||||
- resource: "https://ender5pro.duckdns.org/api/job"
|
||||
method: GET
|
||||
headers:
|
||||
X-Api-Key: !secret octoprint_api_key
|
||||
scan_interval: 30
|
||||
sensor:
|
||||
- name: "OctoPrint Print Progress Live"
|
||||
unique_id: octoprint_print_progress_live
|
||||
unit_of_measurement: "%"
|
||||
state_class: measurement
|
||||
icon: mdi:printer-3d-nozzle
|
||||
value_template: >-
|
||||
{{
|
||||
value_json.progress.completion | float(0) | round(1)
|
||||
}}
|
||||
json_attributes_path: "$.progress"
|
||||
json_attributes:
|
||||
- "filepos"
|
||||
- "printTime"
|
||||
- "printTimeLeft"
|
||||
- "printTimeLeftOrigin"
|
||||
- name: "OctoPrint Print Time Left Live"
|
||||
unique_id: octoprint_print_time_left_live
|
||||
device_class: duration
|
||||
unit_of_measurement: "s"
|
||||
state_class: measurement
|
||||
icon: mdi:timer-outline
|
||||
value_template: >-
|
||||
{{
|
||||
value_json.progress.printTimeLeft | int(-1)
|
||||
}}
|
||||
- name: "OctoPrint Print State Live"
|
||||
unique_id: octoprint_print_state_live
|
||||
icon: mdi:printer-3d
|
||||
value_template: "{{ value_json.state }}"
|
||||
|
||||
# OctoPrint physical position (holds last value when idle; raw discovery sensor zeroes on currentZ:null)
|
||||
mqtt:
|
||||
|
||||
Reference in New Issue
Block a user