diff --git a/automations.yaml b/automations.yaml index cadf728d..4320d77e 100644 --- a/automations.yaml +++ b/automations.yaml @@ -4128,3 +4128,88 @@ target: entity_id: input_boolean.3d_printer_running 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 diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json index 27c83b7e..d53cd8df 100644 --- a/zigbee2mqtt/state.json +++ b/zigbee2mqtt/state.json @@ -4,7 +4,7 @@ "state": "ON", "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 119.6, + "voltage": 119.8, "countdown_to_turn_on": 0, "ac_frequency": 60, "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_release_notes": null }, - "power": 0.5, + "power": 0.4, "linkquality": 91, "current": 0.03, "power_on_behavior": "on" }, "0xffffb40e0607af27": { "state": "ON", - "voltage": 119, + "voltage": 118.6, "ac_frequency": 60, "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "power": 2, + "power": 2.1, "current": 0.09, - "energy": 46.97, - "power_factor": 0.16, + "energy": 46.98, + "power_factor": 0.18, "update": { "state": "idle", "installed_version": 268513381, @@ -45,10 +45,10 @@ "state": "ON", "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 118.6, + "voltage": 119.3, "countdown_to_turn_on": 0, - "energy": 91.26, - "power_factor": 0.9, + "energy": 91.3, + "power_factor": 0.2, "ac_frequency": 60, "update": { "state": "idle", @@ -58,13 +58,13 @@ "latest_release_notes": null }, "linkquality": 120, - "power": 82.6, - "current": 0.78, + "power": 0.2, + "current": 0.01, "power_on_behavior": "on" }, "0xb40e060fffe031e3": { "battery": 100, - "contact": false, + "contact": true, "tamper": false, "battery_low": false, "linkquality": 120, @@ -74,12 +74,12 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "voltage": 118.2, + "voltage": 118.3, "state": "ON", "ac_frequency": 60, - "energy": 186.88, - "power": 0.8, - "current": 0.05, + "energy": 186.98, + "power": 109.3, + "current": 0.95, "power_factor": 0.34, "update": { "state": "idle", @@ -95,13 +95,13 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "voltage": 119.3, - "energy": 92.79, + "voltage": 118.5, + "energy": 92.87, "state": "ON", - "power": 58.6, - "current": 0.64, + "power": 58.4, + "current": 0.61, "ac_frequency": 60, - "power_factor": 0.8, + "power_factor": 0.65, "update": { "state": "idle", "installed_version": 268513381, @@ -114,12 +114,12 @@ }, "0xffffb40e060895b3": { "state": "ON", - "voltage": 119.2, + "voltage": 119.1, "ac_frequency": 60, - "energy": 12.24, + "energy": 12.27, "current": 0.01, - "power": 0, - "power_factor": 0.22, + "power": 0.1, + "power_factor": 0.11, "linkquality": 87, "update": { "state": "idle", @@ -136,7 +136,7 @@ "0xffffb40e0608864e": { "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 119.6, + "voltage": 119.9, "energy": 29.64, "countdown_to_turn_on": 0, "state": "ON", @@ -171,7 +171,7 @@ }, "0xa4c1380d0679ffff": { "battery": 100, - "temperature": 25.8, + "temperature": 26.4, "temperature_units": "celsius", "temperature_calibration": 0, "update": { @@ -224,7 +224,7 @@ }, "0xb40e060fffe717c5": { "battery": 100, - "occupancy": true, + "occupancy": false, "tamper": false, "battery_low": false, "linkquality": 116,