-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path3d_print
109 lines (102 loc) · 2.89 KB
/
3d_print
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#https://youtu.be/iQZ44ci84Aw
#####################################
sensor:
- platform: history_stats
name: time_3dprint
entity_id: input_boolean.3d_pechat
state: 'on'
type: time
start: "{{ state_attr('automation.telegram_3d_pechat_nachata', 'last_triggered') }}"
end: "{{ state_attr('automation.telegram_3d_pechat_zakonchena', 'last_triggered') }}"
#####################################
input_boolean:
3d_pechat:
name: 3d_pechat
icon: mdi:printer-3d
#####################################
utility_meter:
power_3dprint: # 3D Печать
source: sensor.3d_print_energy
cycle: yearly
tariffs:
- single
#####################################
- automation:
alias: Telegram / 3D печать начата
description: ''
trigger:
- type: power
platform: device
device_id: 6f69eff2555bd8c0379b75742e392120
entity_id: sensor.3d_print_power
domain: sensor
for:
hours: 0
minutes: 0
seconds: 10
above: 31
condition:
- condition: state
entity_id: input_boolean.3d_pechat
state: 'off'
action:
- data:
message: |
{{"\U0001F5A8"}} Печать начата
service: notify.telegram_white
- service: input_boolean.turn_on
target:
entity_id: input_boolean.3d_pechat
data: {}
- service: utility_meter.reset
target:
entity_id: utility_meter.power_3dprint
data: {}
mode: single
- alias: Telegram / 3D печать закончена
description: ''
trigger:
- type: power
platform: device
device_id: 6f69eff2555bd8c0379b75742e392120
entity_id: sensor.3d_print_power
domain: sensor
below: 30
for:
hours: 0
minutes: 0
seconds: 30
condition:
- condition: state
entity_id: input_boolean.3d_pechat
state: 'on'
action:
- data:
entity_id: camera.vivotek_1_profile1
filename: /media/zav.jpg
entity_id: camera.vivotek_1_profile1
service: camera.snapshot
- service: input_boolean.turn_off
target:
entity_id: input_boolean.3d_pechat
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- data:
message: >
{{"\U0001F5A8"}} Печать завершена
{{"\U000023F3"}} Время печати: {{ state_attr('sensor.time_3dprint',
'value') }}
{{"\U0001F50C"}} Потрачено: {{ states.sensor.power_3dprint_single.state
}} kWh
service: notify.telegram_white
- data:
data:
photo:
- caption: ZAV pro
file: /media/zav.jpg
message: test
service: notify.telegram_white
mode: single