automations.yaml, zigbee2mqtt/state.json

This commit is contained in:
Home Assistant Version Control committed 2026-10-01 05:21:07 +00:00
1 parent db9096940d
commit b3d9ae54fa
2 files changed
+56 -6

No files matched your search

+50
View File
@@ -4211,3 +4211,53 @@
value_template: '{{ is_state(''sensor.sparkx_i7_print_status'', ''completed'') value_template: '{{ is_state(''sensor.sparkx_i7_print_status'', ''completed'')
}}' }}'
mode: restart mode: restart
- id: sparkx_i7_cfs_auto_recover
alias: SparkX i7 - CFS Info Auto Recover
description: The ha_creality_ws integration drops its CFS sensors to unavailable
whenever the integration is reloaded, and they only come back when the printer
is asked. This re-requests CFS info after a sustained outage, with a settle delay
and a re-check so a brief reload gap does not cause a spurious request.
triggers:
- entity_id: sensor.sparkx_i7_cfs_box_1_temperature
id: cfs_unavailable
to: unavailable
trigger: state
- event: start
id: ha_start
trigger: homeassistant
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: cfs_unavailable
sequence:
- delay:
minutes: 2
- conditions:
- condition: trigger
id: ha_start
sequence:
- delay:
seconds: 60
- if:
- condition: template
value_template: '{{ is_state(''sensor.sparkx_i7_cfs_box_1_temperature'', ''unavailable'')
}}'
then:
- action: ha_creality_ws.request_cfs_info
target:
device_id: 1196bfc60ac925f3874be27098978ef6
- delay:
seconds: 30
- if:
- condition: template
value_template: '{{ is_state(''sensor.sparkx_i7_cfs_box_1_temperature'', ''unavailable'')
}}'
then:
- action: logbook.log
data:
entity_id: sensor.sparkx_i7_cfs_box_1_temperature
message: CFS info still unavailable 30s after request_cfs_info
name: SparkX i7 CFS
mode: single
+6 -6
View File
@@ -27,7 +27,7 @@
"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": 1.9, "power": 2.3,
"current": 0.09, "current": 0.09,
"energy": 50.77, "energy": 50.77,
"power_factor": 0.19, "power_factor": 0.19,
@@ -48,7 +48,7 @@
"voltage": 120.5, "voltage": 120.5,
"countdown_to_turn_on": 0, "countdown_to_turn_on": 0,
"energy": 96.05, "energy": 96.05,
"power_factor": 0.2, "power_factor": 0.3,
"ac_frequency": 60, "ac_frequency": 60,
"update": { "update": {
"state": "idle", "state": "idle",
@@ -78,7 +78,7 @@
"state": "ON", "state": "ON",
"ac_frequency": 60, "ac_frequency": 60,
"energy": 198.19, "energy": 198.19,
"power": 103.6, "power": 104.1,
"current": 0.92, "current": 0.92,
"power_factor": 0.95, "power_factor": 0.95,
"update": { "update": {
@@ -98,8 +98,8 @@
"voltage": 121, "voltage": 121,
"energy": 95.94, "energy": 95.94,
"state": "ON", "state": "ON",
"power": 19, "power": 17.4,
"current": 0.28, "current": 0.26,
"ac_frequency": 60, "ac_frequency": 60,
"power_factor": 0.56, "power_factor": 0.56,
"update": { "update": {
@@ -119,7 +119,7 @@
"energy": 13.23, "energy": 13.23,
"current": 0.01, "current": 0.01,
"power": 0.1, "power": 0.1,
"power_factor": 0.22, "power_factor": 0.11,
"linkquality": 116, "linkquality": 116,
"update": { "update": {
"state": "idle", "state": "idle",