automations.yaml, zigbee2mqtt/state.json
This commit is contained in:
@@ -4211,3 +4211,53 @@
|
||||
value_template: '{{ is_state(''sensor.sparkx_i7_print_status'', ''completed'')
|
||||
}}'
|
||||
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
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"led_brightness": 100,
|
||||
"countdown_to_turn_off": 0,
|
||||
"countdown_to_turn_on": 0,
|
||||
"power": 1.9,
|
||||
"power": 2.3,
|
||||
"current": 0.09,
|
||||
"energy": 50.77,
|
||||
"power_factor": 0.19,
|
||||
@@ -48,7 +48,7 @@
|
||||
"voltage": 120.5,
|
||||
"countdown_to_turn_on": 0,
|
||||
"energy": 96.05,
|
||||
"power_factor": 0.2,
|
||||
"power_factor": 0.3,
|
||||
"ac_frequency": 60,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
@@ -78,7 +78,7 @@
|
||||
"state": "ON",
|
||||
"ac_frequency": 60,
|
||||
"energy": 198.19,
|
||||
"power": 103.6,
|
||||
"power": 104.1,
|
||||
"current": 0.92,
|
||||
"power_factor": 0.95,
|
||||
"update": {
|
||||
@@ -98,8 +98,8 @@
|
||||
"voltage": 121,
|
||||
"energy": 95.94,
|
||||
"state": "ON",
|
||||
"power": 19,
|
||||
"current": 0.28,
|
||||
"power": 17.4,
|
||||
"current": 0.26,
|
||||
"ac_frequency": 60,
|
||||
"power_factor": 0.56,
|
||||
"update": {
|
||||
@@ -119,7 +119,7 @@
|
||||
"energy": 13.23,
|
||||
"current": 0.01,
|
||||
"power": 0.1,
|
||||
"power_factor": 0.22,
|
||||
"power_factor": 0.11,
|
||||
"linkquality": 116,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
|
||||
Reference in New Issue
Block a user