-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathduet3d.yaml
83 lines (78 loc) · 2.5 KB
/
duet3d.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
homeassistant:
customize:
sensor.duet_status:
friendly_name: '3D Printer Status'
icon: mdi:printer-3d
sensor:
- platform: rest
name: Duet Status
resource: http://192.168.1.150/rr_status?type=3
value_template: '{{ value_json.status }}'
json_attributes:
- temps
- currentLayer
- fractionPrinted
- printDuration
- timesLeft
- platform: template
sensors:
head_temp_current:
friendly_name: "Nozzle Temperature Current"
value_template: '{{ states.sensor.duet_status.attributes.temps.current[1] }}'
unit_of_measurement: "°C"
head_temp_active:
friendly_name: "Nozzle Temperature Active"
value_template: '{{ states.sensor.duet_status.attributes.temps.tools.active[0][0] }}'
unit_of_measurement: "°C"
bed_temp_current:
friendly_name: "Bed Temperature Current"
value_template: '{{ states.sensor.duet_status.attributes.temps.current[0] }}'
unit_of_measurement: "°C"
bed_temp_active:
friendly_name: "Bed Temperature Active"
value_template: '{{ states.sensor.duet_status.attributes.temps.bed.active }}'
unit_of_measurement: "°C"
print_percentage:
friendly_name: "Percentage Printed"
value_template: '{{ states.sensor.duet_status.attributes.fractionPrinted }}'
unit_of_measurement: "%"
print_duration:
friendly_name: "Time Printed"
value_template: '{{ states.sensor.duet_status.attributes.printDuration // 60 }}'
unit_of_measurement: "min"
print_timeleft:
friendly_name: "Est Time Left"
value_template: '{{ states.sensor.duet_status.attributes.timesLeft.filament // 60 }}'
unit_of_measurement: "min"
group:
3dprinter:
name: Ender5
entities:
- sensor.duet_status
- sensor.head_temp_current
- sensor.head_temp_active
- sensor.bed_temp_current
- sensor.bed_temp_active
- sensor.print_percentage
3dprintstats:
automation:
- id: print_finished
alias: Print Finished
trigger:
platform: state
entity_id: sensor.duet_status
from: 'P'
action:
- service: notify.slack
data_template:
message: ':printer: 3D Print is Finished'
- id: print_started
alias: Print Started
trigger:
platform: state
entity_id: sensor.duet_status
from: 'I'
action:
- service: notify.slack
data_template:
message: ':printer: 3D Print has Started'