configuration.yaml, zigbee2mqtt/state.json
This commit is contained in:
+15
-1
@@ -298,6 +298,20 @@ rest:
|
|||||||
- "printStatusResult"
|
- "printStatusResult"
|
||||||
- "duration"
|
- "duration"
|
||||||
- "printStartDateTimeFormatted"
|
- "printStartDateTimeFormatted"
|
||||||
|
# TOTAL FILAMENT MASS: sums PrintJobHistory's own per-job weight (density-aware), in grams
|
||||||
|
- name: "OctoPrint Filament Used Weight Total"
|
||||||
|
unique_id: octoprint_filament_used_weight_total
|
||||||
|
unit_of_measurement: "g"
|
||||||
|
device_class: weight
|
||||||
|
state_class: total
|
||||||
|
icon: mdi:spool
|
||||||
|
value_template: >-
|
||||||
|
{% set ns = namespace(weight=0) %}
|
||||||
|
{% for job in value_json.allPrintJobs | default([]) %}
|
||||||
|
{% set models = job.get('filamentModels') or {} %}
|
||||||
|
{% set ns.weight = ns.weight + (models.get('total', {}).get('usedWeight') or 0) | float(0) %}
|
||||||
|
{% endfor %}
|
||||||
|
{{ ns.weight | round(2) }}
|
||||||
- name: "OctoPrint Recent Prints"
|
- name: "OctoPrint Recent Prints"
|
||||||
unique_id: octoprint_recent_prints
|
unique_id: octoprint_recent_prints
|
||||||
icon: mdi:history
|
icon: mdi:history
|
||||||
@@ -403,4 +417,4 @@ emulated_hue:
|
|||||||
nest_snapshot:
|
nest_snapshot:
|
||||||
|
|
||||||
# G-code proxy for the 3D toolpath viewer card (www/gcode_viewer_card.js)
|
# G-code proxy for the 3D toolpath viewer card (www/gcode_viewer_card.js)
|
||||||
octoprint_gcode_proxy:
|
octoprint_gcode_proxy:
|
||||||
+10
-10
@@ -22,15 +22,15 @@
|
|||||||
},
|
},
|
||||||
"0xffffb40e0607af27": {
|
"0xffffb40e0607af27": {
|
||||||
"state": "ON",
|
"state": "ON",
|
||||||
"voltage": 119.8,
|
"voltage": 121.2,
|
||||||
"ac_frequency": 60,
|
"ac_frequency": 60,
|
||||||
"led_brightness": 100,
|
"led_brightness": 100,
|
||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"power": 2,
|
"power": 2.1,
|
||||||
"current": 0.1,
|
"current": 0.1,
|
||||||
"energy": 32.6,
|
"energy": 32.6,
|
||||||
"power_factor": 0.17,
|
"power_factor": 0.18,
|
||||||
"update": {
|
"update": {
|
||||||
"state": "idle",
|
"state": "idle",
|
||||||
"installed_version": 268513381,
|
"installed_version": 268513381,
|
||||||
@@ -74,11 +74,11 @@
|
|||||||
"led_brightness": 100,
|
"led_brightness": 100,
|
||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"voltage": 121.2,
|
"voltage": 120.1,
|
||||||
"state": "ON",
|
"state": "ON",
|
||||||
"ac_frequency": 60,
|
"ac_frequency": 60,
|
||||||
"energy": 132.2,
|
"energy": 132.2,
|
||||||
"power": 103.6,
|
"power": 102.1,
|
||||||
"current": 0.97,
|
"current": 0.97,
|
||||||
"power_factor": 0.94,
|
"power_factor": 0.94,
|
||||||
"update": {
|
"update": {
|
||||||
@@ -96,12 +96,12 @@
|
|||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"voltage": 120.8,
|
"voltage": 120.8,
|
||||||
"energy": 63.06,
|
"energy": 63.07,
|
||||||
"state": "ON",
|
"state": "ON",
|
||||||
"power": 92.1,
|
"power": 84.7,
|
||||||
"current": 0.94,
|
"current": 0.9,
|
||||||
"ac_frequency": 60,
|
"ac_frequency": 60,
|
||||||
"power_factor": 0.77,
|
"power_factor": 0.74,
|
||||||
"update": {
|
"update": {
|
||||||
"state": "idle",
|
"state": "idle",
|
||||||
"installed_version": 268513381,
|
"installed_version": 268513381,
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
"0xffffb40e060893d8": {
|
"0xffffb40e060893d8": {
|
||||||
"state": "ON",
|
"state": "ON",
|
||||||
"led_brightness": 100,
|
"led_brightness": 100,
|
||||||
"voltage": 121.3,
|
"voltage": 121.8,
|
||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"energy": 3.64,
|
"energy": 3.64,
|
||||||
|
|||||||
Reference in New Issue
Block a user