automations.yaml
This commit is contained in:
+27
-14
@@ -3828,10 +3828,12 @@
|
||||
mode: single
|
||||
- id: '1787723854939'
|
||||
alias: 3D Printer Lights - Sync Boolean
|
||||
description: Synchronizes input_boolean.3d_printer_lights when the SparkX i7 light
|
||||
changes manually.
|
||||
description: Synchronizes input_boolean.3d_printer_lights when either printer light
|
||||
changes manually, keeping the SparkX and local lights aligned.
|
||||
triggers:
|
||||
- entity_id: light.sparkx_i7_light
|
||||
- entity_id:
|
||||
- light.sparkx_i7_light
|
||||
- light.3d_printer_lights_local
|
||||
id: light_changed
|
||||
trigger: state
|
||||
- event: start
|
||||
@@ -3839,8 +3841,8 @@
|
||||
trigger: homeassistant
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: '{{ is_state(''input_boolean.3d_printer_lights'', ''on'') != is_state(''light.sparkx_i7_light'',
|
||||
''on'') }}'
|
||||
value_template: "{{ is_state('input_boolean.3d_printer_lights', 'on') !=\n (is_state('light.sparkx_i7_light',
|
||||
'on') or\n is_state('light.3d_printer_lights_local', 'on')) }}"
|
||||
actions:
|
||||
- if:
|
||||
- condition: trigger
|
||||
@@ -3849,19 +3851,30 @@
|
||||
- delay:
|
||||
seconds: 15
|
||||
- else:
|
||||
- action: input_boolean.turn_off
|
||||
data: {}
|
||||
- action: light.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.3d_printer_lights
|
||||
entity_id: light.sparkx_i7_light
|
||||
- action: light.turn_off
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.3d_printer_lights_local
|
||||
if:
|
||||
- condition: state
|
||||
entity_id: light.sparkx_i7_light
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: light.sparkx_i7_light
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: light.3d_printer_lights_local
|
||||
state: 'on'
|
||||
then:
|
||||
- action: input_boolean.turn_on
|
||||
data: {}
|
||||
- action: light.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.3d_printer_lights
|
||||
entity_id: light.sparkx_i7_light
|
||||
- action: light.turn_on
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.3d_printer_lights_local
|
||||
mode: single
|
||||
- id: '1787790202454'
|
||||
alias: Z2M Error Monitor
|
||||
|
||||
Reference in New Issue
Block a user