forked from Yonsm/.homeassistant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.yaml
More file actions
67 lines (66 loc) · 1.98 KB
/
scripts.yaml
File metadata and controls
67 lines (66 loc) · 1.98 KB
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
#
turn_on_projector:
alias: 打开投影仪
sequence:
- service: automation.turn_off
entity_id: automation.study_switch_dbclicked
- service: switch.turn_on
entity_id: switch.projector_power
- delay: 2
- service: switch.turn_on
entity_id: switch.benq
- service: switch.turn_on
entity_id: switch.himedia
- service: cover.close_cover
entity_id: cover.study_cover
#- service: cover.close_cover
# entity_id: cover.airer
- service: fan.turn_on
entity_id: fan.purifier
- service: fan.set_speed
data:
entity_id: fan.purifier
speed: auto
- service: switch.turn_on
entity_id: switch.speaker
#- service: light.turn_off
# entity_id: light.airer_light
- service: light.turn_off
entity_id: light.study_light
- delay: 2
- service: switch.turn_on
entity_id: switch.benq
- service: automation.turn_on
entity_id: automation.study_switch_dbclicked
- condition: numeric_state
entity_id: sensor.purifier_temperature
above: 28
- service: switch.turn_on
entity_id: switch.mitsubishi
#
turn_off_projector:
alias: 关闭投影仪
sequence:
- service: automation.turn_off
entity_id: automation.study_switch_dbclicked
- service: switch.turn_off
entity_id: switch.benq
- service: switch.turn_off
entity_id: switch.himedia
- service: cover.open_cover
entity_id: cover.study_cover
- service: mqtt.publish
data:
topic: NodeMCU3/relay/0/set
payload: 'off'
- service: switch.turn_off
entity_id: switch.benq
- service_template: "{% if is_state('sun.sun', 'below_horizon') %}light.turn_on{% else %}light.turn_off{% endif %}"
entity_id: light.study_light
- service: switch.turn_off
entity_id: switch.mitsubishi
- delay: 250
- service: switch.turn_off
entity_id: switch.projector_power
- service: automation.turn_on
entity_id: automation.study_switch_dbclicked