Add 3D Printer button
This commit is contained in:
parent
7fc7d674f4
commit
c93d4cacfa
@ -30,3 +30,37 @@
|
||||
for: '00:00:05'
|
||||
action:
|
||||
- service: rest_command.octoprint_connect
|
||||
|
||||
- id: 3dprinter-button
|
||||
alias: '[3D Printer] button'
|
||||
mode: single
|
||||
trigger:
|
||||
- device_id: a2ac0fa69738b8e7c5c1b8b8bcf8cdc2
|
||||
domain: zha
|
||||
platform: device
|
||||
type: remote_button_short_press
|
||||
subtype: remote_button_short_press
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.3d_printer_switch
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.3d_printer_switch
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: switch.3d_printer_switch
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.octoprint_printing
|
||||
state: 'off'
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.3d_printer_power
|
||||
below: '30'
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.3d_printer_switch
|
Loading…
Reference in New Issue
Block a user