configuration.yaml, zigbee2mqtt/state.json

This commit is contained in:
Home Assistant Version Control
2026-08-08 02:03:59 +00:00
parent a25c9c4bfc
commit 4feff22329
2 changed files with 61 additions and 31 deletions
+30
View File
@@ -237,6 +237,36 @@ sensor:
method: left method: left
round: 2 round: 2
# OctoPrint PrintHistory - filament usage from https://ender5pro.duckdns.org
rest:
- resource: "https://ender5pro.duckdns.org/plugin/printhistory/history"
method: GET
headers:
X-Api-Key: !secret octoprint_api_key
scan_interval: 300
sensor:
- name: "OctoPrint Filament Used Total"
unique_id: octoprint_filament_used_total
unit_of_measurement: "mm"
icon: mdi:spool
value_template: >-
{{
value_json.history
| selectattr('filamentLength', 'ne', None)
| map(attribute='filamentLength')
| map('float')
| sum
| round(2)
}}
json_attributes_path: "$.history"
json_attributes:
- "fileName"
- "filamentLength"
- "filamentVolume"
- "printTime"
- "success"
- "timestamp"
emulated_hue: emulated_hue:
host_ip: 192.168.1.140 host_ip: 192.168.1.140
advertise_ip: 192.168.1.140 advertise_ip: 192.168.1.140
+31 -31
View File
@@ -1,13 +1,13 @@
{ {
"0xffffb40e0607ace4": { "0xffffb40e0607ace4": {
"energy": 13.95, "energy": 13.96,
"state": "ON", "state": "ON",
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"voltage": 120.4, "voltage": 118.6,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"ac_frequency": 60, "ac_frequency": 60,
"power_factor": 0.31, "power_factor": 0.57,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -15,19 +15,19 @@
"latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota", "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota",
"latest_release_notes": null "latest_release_notes": null
}, },
"power": 0.5, "power": 79.9,
"linkquality": 116, "linkquality": 116,
"current": 0.04, "current": 1.19,
"power_on_behavior": "on" "power_on_behavior": "on"
}, },
"0xffffb40e0607af27": { "0xffffb40e0607af27": {
"state": "ON", "state": "ON",
"voltage": 119.5, "voltage": 120.7,
"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.3,
"current": 0.11, "current": 0.11,
"energy": 27.05, "energy": 27.05,
"power_factor": 0.16, "power_factor": 0.16,
@@ -45,10 +45,10 @@
"state": "ON", "state": "ON",
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"voltage": 119.8, "voltage": 118.2,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"energy": 50.64, "energy": 50.65,
"power_factor": 0.89, "power_factor": 0.2,
"ac_frequency": 60, "ac_frequency": 60,
"update": { "update": {
"state": "idle", "state": "idle",
@@ -58,13 +58,13 @@
"latest_release_notes": null "latest_release_notes": null
}, },
"linkquality": 134, "linkquality": 134,
"power": 85.8, "power": 82.4,
"current": 0.87, "current": 0.77,
"power_on_behavior": "on" "power_on_behavior": "on"
}, },
"0xb40e060fffe031e3": { "0xb40e060fffe031e3": {
"battery": 100, "battery": 100,
"contact": true, "contact": false,
"tamper": false, "tamper": false,
"battery_low": false, "battery_low": false,
"linkquality": 134, "linkquality": 134,
@@ -74,12 +74,12 @@
"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": 118.4, "voltage": 116.6,
"state": "ON", "state": "ON",
"ac_frequency": 60, "ac_frequency": 60,
"energy": 103.2, "energy": 103.24,
"power": 96, "power": 96.1,
"current": 0.85, "current": 0.86,
"power_factor": 0.94, "power_factor": 0.94,
"update": { "update": {
"state": "idle", "state": "idle",
@@ -95,13 +95,13 @@
"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": 119.9, "voltage": 118.5,
"energy": 44.36, "energy": 44.38,
"state": "ON", "state": "ON",
"power": 58.2, "power": 49.2,
"current": 0.65, "current": 0.57,
"ac_frequency": 60, "ac_frequency": 60,
"power_factor": 0.74, "power_factor": 0.76,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -114,10 +114,10 @@
}, },
"0xffffb40e060895b3": { "0xffffb40e060895b3": {
"state": "ON", "state": "ON",
"voltage": 119.8, "voltage": 118.5,
"ac_frequency": 60, "ac_frequency": 60,
"energy": 6.4, "energy": 6.4,
"current": 0.02, "current": 0.01,
"power": 0.1, "power": 0.1,
"power_factor": 0.11, "power_factor": 0.11,
"linkquality": 123, "linkquality": 123,
@@ -136,14 +136,14 @@
"0xffffb40e0608864e": { "0xffffb40e0608864e": {
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"voltage": 119.8, "voltage": 118.9,
"energy": 17.35, "energy": 17.35,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"state": "ON", "state": "ON",
"current": 0.02, "current": 0.02,
"ac_frequency": 60, "ac_frequency": 60,
"power": 0.3, "power": 0.3,
"power_factor": 0.14, "power_factor": 0.2,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -172,13 +172,13 @@
"0xffffb40e060893d8": { "0xffffb40e060893d8": {
"state": "ON", "state": "ON",
"led_brightness": 100, "led_brightness": 100,
"voltage": 120.5, "voltage": 118.9,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"energy": 3.04, "energy": 3.04,
"power_on_behavior": "on", "power_on_behavior": "on",
"linkquality": 87, "linkquality": 87,
"current": 0.11, "current": 0.01,
"ac_frequency": 60, "ac_frequency": 60,
"update": { "update": {
"state": "idle", "state": "idle",
@@ -187,12 +187,12 @@
"latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota", "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota",
"latest_release_notes": null "latest_release_notes": null
}, },
"power_factor": 0.07, "power_factor": 0.06,
"power": 0.1 "power": 0.2
}, },
"0xa4c1380d0679ffff": { "0xa4c1380d0679ffff": {
"battery": 100, "battery": 100,
"temperature": 28.3, "temperature": 28.2,
"temperature_units": "celsius", "temperature_units": "celsius",
"temperature_calibration": 0, "temperature_calibration": 0,
"update": { "update": {