automations.yaml, zigbee2mqtt/state.json

This commit is contained in:
Home Assistant Version Control
2026-09-25 17:30:48 +00:00
parent 4af8713fe2
commit bb3d020b19
2 changed files with 113 additions and 28 deletions
+85
View File
@@ -4128,3 +4128,88 @@
target: target:
entity_id: input_boolean.3d_printer_running entity_id: input_boolean.3d_printer_running
mode: single mode: single
- id: '1789900000001'
alias: 3D Print - Safe to Remove
description: After a successful SparkX i7 print, wait for the bed and nozzle to
stay at or below 30 degrees for 5 minutes, then notify all existing print devices.
triggers:
- entity_id: sensor.sparkx_i7_print_status
from: printing
id: print_completed
to: completed
trigger: state
- entity_id: sensor.sparkx_i7_print_status
id: new_print
to: printing
trigger: state
actions:
- choose:
- conditions:
- condition: trigger
id: print_completed
sequence:
- variables:
print_name: '{% set file = trigger.to_state.attributes.get(''file'', '''')
%} {% if file in ['''', none, ''unknown'', ''unavailable''] %}The print
{% else %}{{ file.split(''/'')[-1].replace(''.gcode'', '''') }} {% endif
%}'
- repeat:
sequence:
- continue_on_timeout: false
timeout: 02:00:00
wait_template: '{{ is_state(''sensor.sparkx_i7_print_status'', ''completed'')
and states(''sensor.sparkx_i7_bed_temperature'') | float(100) <= 30
and states(''sensor.sparkx_i7_nozzle_temperature'') | float(300) <=
30 }}'
- delay:
minutes: 5
- if:
- condition: template
value_template: '{{ is_state(''sensor.sparkx_i7_print_status'', ''completed'')
and states(''sensor.sparkx_i7_bed_temperature'') | float(100) <= 30
and states(''sensor.sparkx_i7_nozzle_temperature'') | float(300) <=
30 }}'
then:
- variables:
bed_temp: '{{ states(''sensor.sparkx_i7_bed_temperature'') | float(0)
| round(1) }}'
nozzle_temp: '{{ states(''sensor.sparkx_i7_nozzle_temperature'') |
float(0) | round(1) }}'
safe_message: '{{ print_name }} is cool enough to remove. Bed: {{
bed_temp }} °C, nozzle: {{ nozzle_temp }} °C.'
- action: notify.send_message
data:
message: '{{ safe_message }}'
title: 3D print safe to remove
target:
entity_id: notify.sm_f956w
- action: notify.send_message
data:
message: '{{ safe_message }}'
title: 3D print safe to remove
target:
entity_id: notify.motorola_one_vision
- action: notify.send_message
data:
message: '{{ safe_message }}'
title: 3D print safe to remove
target:
entity_id: notify.francos_ipad
- action: notify.send_message
data:
message: '{{ safe_message }}'
title: 3D print safe to remove
target:
entity_id: notify.sm_t387w
- action: notify.send_message
data:
message: '{{ safe_message }}'
title: 3D print safe to remove
target:
entity_id: notify.franco
- stop: Safe-to-remove notification sent.
while:
- condition: template
value_template: '{{ is_state(''sensor.sparkx_i7_print_status'', ''completed'')
}}'
mode: restart
+28 -28
View File
@@ -4,7 +4,7 @@
"state": "ON", "state": "ON",
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"voltage": 119.6, "voltage": 119.8,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"ac_frequency": 60, "ac_frequency": 60,
"power_factor": 0.14, "power_factor": 0.14,
@@ -15,22 +15,22 @@
"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": 0.4,
"linkquality": 91, "linkquality": 91,
"current": 0.03, "current": 0.03,
"power_on_behavior": "on" "power_on_behavior": "on"
}, },
"0xffffb40e0607af27": { "0xffffb40e0607af27": {
"state": "ON", "state": "ON",
"voltage": 119, "voltage": 118.6,
"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.09, "current": 0.09,
"energy": 46.97, "energy": 46.98,
"power_factor": 0.16, "power_factor": 0.18,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -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": 118.6, "voltage": 119.3,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"energy": 91.26, "energy": 91.3,
"power_factor": 0.9, "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": 120, "linkquality": 120,
"power": 82.6, "power": 0.2,
"current": 0.78, "current": 0.01,
"power_on_behavior": "on" "power_on_behavior": "on"
}, },
"0xb40e060fffe031e3": { "0xb40e060fffe031e3": {
"battery": 100, "battery": 100,
"contact": false, "contact": true,
"tamper": false, "tamper": false,
"battery_low": false, "battery_low": false,
"linkquality": 120, "linkquality": 120,
@@ -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.2, "voltage": 118.3,
"state": "ON", "state": "ON",
"ac_frequency": 60, "ac_frequency": 60,
"energy": 186.88, "energy": 186.98,
"power": 0.8, "power": 109.3,
"current": 0.05, "current": 0.95,
"power_factor": 0.34, "power_factor": 0.34,
"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.3, "voltage": 118.5,
"energy": 92.79, "energy": 92.87,
"state": "ON", "state": "ON",
"power": 58.6, "power": 58.4,
"current": 0.64, "current": 0.61,
"ac_frequency": 60, "ac_frequency": 60,
"power_factor": 0.8, "power_factor": 0.65,
"update": { "update": {
"state": "idle", "state": "idle",
"installed_version": 268513381, "installed_version": 268513381,
@@ -114,12 +114,12 @@
}, },
"0xffffb40e060895b3": { "0xffffb40e060895b3": {
"state": "ON", "state": "ON",
"voltage": 119.2, "voltage": 119.1,
"ac_frequency": 60, "ac_frequency": 60,
"energy": 12.24, "energy": 12.27,
"current": 0.01, "current": 0.01,
"power": 0, "power": 0.1,
"power_factor": 0.22, "power_factor": 0.11,
"linkquality": 87, "linkquality": 87,
"update": { "update": {
"state": "idle", "state": "idle",
@@ -136,7 +136,7 @@
"0xffffb40e0608864e": { "0xffffb40e0608864e": {
"led_brightness": 100, "led_brightness": 100,
"countdown_to_turn_off": 0, "countdown_to_turn_off": 0,
"voltage": 119.6, "voltage": 119.9,
"energy": 29.64, "energy": 29.64,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"state": "ON", "state": "ON",
@@ -171,7 +171,7 @@
}, },
"0xa4c1380d0679ffff": { "0xa4c1380d0679ffff": {
"battery": 100, "battery": 100,
"temperature": 25.8, "temperature": 26.4,
"temperature_units": "celsius", "temperature_units": "celsius",
"temperature_calibration": 0, "temperature_calibration": 0,
"update": { "update": {
@@ -224,7 +224,7 @@
}, },
"0xb40e060fffe717c5": { "0xb40e060fffe717c5": {
"battery": 100, "battery": 100,
"occupancy": true, "occupancy": false,
"tamper": false, "tamper": false,
"battery_low": false, "battery_low": false,
"linkquality": 116, "linkquality": 116,